How can i 'complete' my dart SDK rather than installing a separate version when using flutter? - flutter

I installed flutter by downloading and installing a release version.
It contains a partial dart SDK in its cache subfolder.
Namely, it's missing (amongst others executables) dart2native.
I realize I could just download and install a separate dart SDK from their website, then change all my paths to point to this newer, complete SDK. But that's exactly the problem - I do not wish to run 2 sdk version in parallel, it's confusing and likely will cause errors down the line (for example, my copy of android studio might be pointing at this or that SDK, and god knows what other tools might point towards it).
Question: is there a way to 'fill' my flutter dart SDK with the missing tools? Or am i doomed to run 2 version of dart SDK in parallel?

Answering my own question - after much googling, I found a repo maintainer stating that "For now, if you want to do to Dart development and use the Dart terminal commands (like dartfmt, pub, or dart2native), it's recommended that you download and install the Dart SDK. If you'd like you can also add it to path."
This is clearly sub-optimal. In fact just as I expected it seems to have led to a few people having faced issues, comment on https://github.com/flutter/flutter/issues/43968 if you'd like to see this addressed.

Related

Ubuntu | Flutter Doctor: dart is not in you current flutter SDK

Warning: `dart` on your path resolves to /usr/lib/dart/bin/dart, which is
not inside your current Flutter SDK checkout at /home/ankit/flutter.
Consider adding /home/ankit/flutter/bin to the front of your path.
This exception started when the flutter was updated. How do I solve this?
The Problem:
This is happening because you have a separate installation of Dart on your system. The Flutter SDK includes and manages it's own dart SDK, but you can use the dart SDK separately.
Why it Matters
Flutter recommends that you use the dart SDK included with Flutter because Flutter manages it - It will automatically use and upgrade supported versions when using the flutter upgrade command on your terminal, and during initial install.
Flutter is noticing that you have a dart SDK install that did not come with the Flutter SDK. It's giving you a warning because of the possible differences in versions (and possibly other configurations) that could prevent an optimal flutter development experience.
System Path
Here's an explanation of path. You will probably need to set your path environment variables to get the whole fix.
This link shows the official Apple guide to working with the terminal environment variables (including path) but a quick google around should help you find any answers you can't find here.
The path resolves from "front" to "back" - meaning that if the executable in question occurs twice, it will grab the first one. Flutter doctor wants you to add the flutter dart path at the front so that subsequent dart calls will resolve to the Flutter Dart SDK.
The High-Level Solution
Unless you're doing dart development outside flutter, you don't need an additional dart SDK. Most of the time the Flutter dart SDK will work for cases besides flutter as well.
I would recommend removing your other dart install, and using the dart install that comes with flutter. This process will vary depending on how you installed the other dart SDK.
TLDR/Quick Fix
based on what you provided, run this on your Zsh command-line:
export PATH="/home/ankit/flutter/bin:$PATH"
It will only work until you restart your computer.

sdkmanager error (Warning: IO exception while downloading manifest)

when I try installing build tools using sdkmanager on window using this command below
C:\all-things-flutter\flutter-installation\android\cmdline-tools\bin>sdkmanager.bat "build-tools;30.0.0" --sdk_root=../
I keep getting this error
Warning: IO exception while downloading manifest
please this is not a duplicate question, cus I didn't find the answer I needed.
this has been bugging me for days so how can I get it right
So since I could not get an answer after 8 months, I have decided to share how I did it and other kinds of solutions people have suggested but not from here.
How i did it
I downloaded android studio (even tho i was not going to use it), then i use android studio to download the recommended SDK i will need, after that i added the SDK folder path to my system variable, that way i can continue the flutter installation and run flutter doctor, which did ditect my SDK path.
Other people Suggesttion
From my research online, I saw people saying that you need a much slower internet connection because if your internet connection is faster, it will skip some downloads, which can cause the SDK to not work well.
but my response to that is "yer good luck with that".

Problems with sdk and ndk in unity?

Can't build the project and use unity remote. What to do? Downloaded the latest 2020 LTS with a development package for android
External Tools
Unity hub
When installing a version from the Unity Hub, make sure you have selected the various android packages as you see in the image.
You have shown a link where you show that you did. If the procedure is the one I showed you above, you are not wrong.
Perhaps the problem may be related to Unity 2020.3.15 which in fact I do not find among the available downloads and which was released a few days ago. Maybe they caught some bugs (like maybe what you are showing), and took it out of the releases. Try downloading the 2020.3.14 version from the site (the one I use too), and see if the problem persists.
https://unity3d.com/get-unity/download/archive

Flutter, where is the Dart?

So, I've downloaded flutter SDK 1.17.5-stable and installed it following the manual but I confused a little bit by tutorial.
According to manual:
As of Flutter’s 1.19.0 dev release, the Flutter SDK contains the dart command alongside the flutter command so that you can more easily run Dart command-line programs.
But flutter/bin has only a single binary, flutter itself. According to this answer I found dart binary located within bin/cache/dart-sdk.
I definitely can add path to this directory to my .zshrc and it will work, but I would like to know if it intended behavior and manual just not updated and I haven't done anything wrong.
Mystery solved! I didn't pay attention that 1.17.5 < 1.19.0 and 1.19.0 still in beta/dev channels as of date 15/Jul/2020, so tutorial was updated for release which hasn't been released yet.

ADT Plugin Directory Location for SDK - (MotoDev)

Right now I am setting up Motodev.
Its a Android Development Suite built on Eclipse, created by Motorola.
What is needed is the Android SDK. Check, got that, newest version, everything is set with that.
Now it says I need the ADT Eclipse plugin. Version 20.0.1, currently mine is v18.
I know where to get it, I can easily get it, but I am curious, where should it be installed? Currently I dont have eclipse I am just using MotoDev. But since Motodev asks where the SDK location is, and says my ADT plugin is out of date, I am assuming I have to install the ADT in the SDK directory. But is there somewhere more specific to put it? In a specific folder? or just in the top level of the SDK directory?
Thanks for your time.
Unfortunately, you can't use ADT20 with MOTODEV Studio 4.0. The plugins had some API changes between 18 and 20 that made them incompatible with each other. You will need to roll your SDK back to 19 until we can release a newer version. I wrote about this about a week ago on the MOTODEV Studio blog.
We're done with the engineering work on the new version. It's just a matter of getting the push to the web server scheduled. I expect it to be ready by late next week or early the following week.
Until then, if you need to use ADT20 for Jellybean development, use Eclipse for Mobile Developers plus the MOTODEV Core Plugins (using Help>Eclipse Marketplace). Most of the functionality of the installed product is there, but without the dependency on ADT. See the blog for details on how to set that up.