Good day Guys, i'm new on flutter & I wan set up flutter and the android SDK(without using android studio) on my device but when i run flutter doctor --android-licenses command i get this error after running the command
(/home/olaneat/android/Sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/linux#android-setup for
detailed instructions.
this is how i configured my path
ANDROID_HOME="$PATH:/home/olaneat/android/Sdk"
export PATH="$PATH:/home/olaneat/android/Sdk/platform-tools"
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
export PATH="$JAVA_HOME/bin:$ANDROID_HOME/cmdline-tools/tools/bin:$ANDROID_HOME/platform-tools:SPATH"
and i have my SDK already installed
can anyone help out?
Update cmdline-tools direcotry
Try changing the path name cmdline-tools/tools to cmdline-tools/latest. I was facing the same problem and found that the directory patern has been updated.
Related
I'm getting this warning after using "Flutter Doctor" command after the installation of Dart using brew tap dart-lang/dart on MacOS Big Sur
Flutter (Channel stable, 3.7.0, on macOS 11.7.2 20G1020 darwin-x64,
locale
en-GB)
! Warning: dart on your path resolves to
/usr/local/Cellar/dart/2.19.1/libexec/bin/dart, which is not inside your
current Flutter SDK checkout at /Users/puneet/development/flutter.
Consider adding /Users/puneet/development/flutter/bin to the front of your
path.
Can you anyone tell me how can i resolve this issue?
I'm trying avoid this warning and run a code on android studio developed on flutter framework.
I resolve this warning by just uninstalling the dart sdk using this command -
brew uninstall dart
Since dart sdk already comes with flutter installation, you need not to install it seperately.
Here is how I solve this problem
My dart path on environmental variable was look like (Both user and system variable)
C:\src\dart-sdk\bin
Now I change it to
C:\src\dart-sdk\bin\dart.exe
and the problem resolved.
The Flutter framework also contains Dart. So, if you already installed Dart separately on your OS, remove Dart and its Path from your system. You should have only one Path that is: /Users/puneet/development/flutter/bin
SOLVED
when you update your flutter to the latest version this warning comes in your flutter doctor output:-
for solving this just go and open .zshrc and after that check your flutter bin path is like this:-
change your path into this:-
and then run flutter doctor again... PROBLEM SOLVED ☺️
I'm having a problem accepting the Android Licenses. I've looked for well over a month for a solve and haven't found one yet. My username on my mac contains the word (Deleted) with a space before it and I'm wondering if that's causing any problems.
I run $ flutter doctor and get this result:
I run $ flutter doctor --android-licenses
And I get this error:
Error: Could not find or load main class (Deleted).Library.Android.sdk.cmdline-tools.latest
I have all the SDK tools installed and updated to the latest. What I have installed is pictured below:
I have Java 8 installed and running, as well. Not getting any errors with Java.
Could use another pair of eyes to see what I'm doing wrong.
Here is my flutter doctor -v output:
First set android sdk path by flutter config --android-sdk <path-to-your-android-sdk-path>
and run flutter doctor --android-licenses again
I have started with the setup of flutter updated version and am a total beginner in this platform. This is the error I have been getting. Could you please help me?
You have to install Android SDK Command-line Tools (in SDK Manager).
After Installing, accept the android licensces (in CMD)
flutter doctor --android-licenses
Either install Android Studio to get the required dependecies or download an android sdkmanager and check its path (path/to/sdkmanager should be the path to that).
To avoid any problems for beginners, I would just install Android Studio here, set it up until it installs the android sdk, then switch to Flutter: that was the only way to fix this since some time ago if I remember correctly
Please first run this command
flutter doctor --android-licenses
then follow this link : Android/Sdk is missing a Tools folder, meaing no sdkmanager, meaning "Android license status unknown" error
When I was trying to build and run a flutter app it shows me the following message:
"Could not locate aapt. Please ensure you have the Android buildtools installed.
Exception: Problem building Android application: see above error(s)."
I already have both build tools and the android sdk installed, so I don't know what might have caused this issue.
Going into the folder where the android sdk is located and under the 'build-tools' delete everything inside it, then using android studio re install the build tools this will fix the issue
check in cmd flutter doctor
something like this will occur
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
X Android SDK file not found: C:\Users\aksha\AppData\Local\Android\sdk\build-tools\30.0.3\aapt.
problem is your sdk version 30.0.3 is not installed successfully
try to download it seperatelly from
https://androidsdkoffline.blogspot.com/p/android-sdk-build-tools.html?m=1
and unzip it and replace its contant with 30.0.3 at location C:\Users\aksha\AppData\Local\Android\sdk\build-tools\30.0.3
restart
done
For me the issue was resolved by running flutter doctor in cmd. The issue was accepting licenses. Running flutter doctor --android-licenses and then typing y for all licenses resolved the issue.
You can use this command flutter config --android-sdk after updating the android studio and can refer to the path from SDK manager
I was able to generate apk but I was also unable to install the apk in device I removed the error by following steps-
go to C:\Users\aksha\AppData\Local\Android\sdk\build-tools\30.0.3 (check show hidden items option)
delete this folder inside build-tools (because the error is not installed properly).
for resolving this issue, we have to uncheck all the latest plateforms (android (S)12 etc) and click apply after this restart the studio and check all these platforms again at least one latest and apply(ok).
Open Android Studio->files->Settings->Appearence & Behavior->System
Settings->Android SDK->SDK plateforms(Latest)
run flutter command to accept the licenses. (type Y then enter for all)
flutter doctor --android-licenses
all is done
It will be an Android Studio bug.
I updated Android Studio to the latest Beta version and fixed it.
I hope it will be of help to you too.
If you are using ubuntu check /home/username/Android/Sdk folder present or not, I think your sdk folder deleted or moved to new location. thats why this issue happen.
You must update your build tools of SDK by using SDK manager in android studio.
go to androidstudio->sdkmanager->sdktools->then update build tools
Delete uncompleted downloads in the "C:\Users\User\AppData\Local\Android\Sdk.downloadIntermediates" folder and reinstall the SDK build tools via the Android Studio's SDK manager.
I've been trying to solve this error since one day.
First I got this error
Exception: Android sdkmanager tool not found (/ usr / lib / android-sdk / tools / bin / sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.io/setup/#android-setup for detailed instructions.
Here is a Screenshot
I tried to solve this error but couldn't solve it and I deleted Android Studio completely (sdk, gradle, .android ... etc). I reinstalled and flutter I got this error when I wrote doctor. New errors Screenshot
C:\Users\Fatihh>flutter doctor --android-licenses
Warning: File C:\Users\Fatihh\.android\repositories.cfg could not be loaded.
4 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)?
C:\Users\Fatihh>
Finally I made the decision to write here. I need help.
Android studio version:4.1.1
OS :Win 10
Flutter SDK :1.22.5
Android SDK:30.3
First, open Android Studio and install Flutter and Dart plugins on it.
Then run the command flutter doctor --android-licenses
Finally, clean your project, make sure packages are installed and run it
flutter clean
flutter pub get
flutter run