Good day,
I reinstalled Android Studio 2-3 times and still I am unable to get the tools folder created in my sdk folder.
I manually tried downloading but the following error is popping up:
Warning: Could not create settings
java.lang.IllegalArgumentException
Following are my configuration
SDK Tools
SDK Platforms
In Android Studio
Uninstall Android SDK Command-line Tools under the SDK Tools tab. Close Android Studio
In your sdk folder delete or rename cmdline-tools folder and tools folder Open Android Studio
In SDK Manager see if Command-line is still checkmarked or partially marked uninstall it again. If not then install the latest
one, don't install older one. Close Android Studio Open CMD
Navigate to %sdk folder%\cmdline-tools\bin\
Run sdkmanager --licenses
Accept them
NOTE : flutter doctor will still show error but should run fine
Related
On a freshly installed macOS Catalina, I installed Android Studio 3.6.1.
I've got the following error when I ran flutter doctor in the course of setting up flutter SDK on my Mac.
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
✗ Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/setup/#android-setup for detailed instructions.
I re-installed Android Studio and follow the instructions in the second link in the error message, but these links do not seem to help resolving the issue. I also tried the following:
$ flutter doctor --android-licenses
Which gives the following error:
Android sdkmanager tool not found
(/Users/username/Library/Android/sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.
I checked my installation and found out that tools directory is missing under ~/Library/Android/sdk/.
Also, I found out Android SDK Tools option is missing from SDK Tools tab in SDK Manager of the Android Studio as shown in this screenshot. (Android SDK Tools option was present on my previous installation of Android Studio 3.5.3.)
Has anyone had the similar problem? I am not sure what I'm doing wrong. If anyone can show me how I can fix this issue, I'd appreciate it! (This is my first question on Stack Overflow. Please excuse me for lengthy post.)
I'm using Linux but I guess the problem might be the same.
Launch Android Studio and go to "SDK Manager" - you can launch it after creating a blank project and going "Tools -> SDK Manager" under the "AVD Manager" option. In the new window open "System Settings -> Android SDK". From there pick "SDK Tools". Now you need to uncheck the "Hide Obsolete Packages" option in the bottom of the window. Now there should appear a new option: "Android SDK Tools (Obsolete)" - check that, hit "Apply" - it will download the files and "Tools" folder will appear in the Android folder. Then simply run "flutter doctor" in the terminal and you should be asked to accept some licenses - simply run:
$ flutter doctor --android-licenses
It helped me. I don't know why this option went obsolete when Flutter requires it anyway. Check the settings printscreen.
Step1. Download latest sdk tools from https://androidsdkmanager.azurewebsites.net/SDKTools.
up to 2020-03-08 the latest version is 26.2.0.
Step2. Unzip and then copy "tools" folder into android-sdk folder. "tools" and "build-tools" is in the same depth.
Step3. flutter doctor --android-licenses
Step4. flutter doctor
Open the Android Studio SDK Manager
In the Android SDK tab, uncheck Hide Obsolete Packages
Check Android SDK Tools (Obsolete) Check and download it!
I had a similar problem with Android Studio 3.6.1 (not involving flutter): the platform-tools directory got installed within another platform-tools directory, so Android Studio couldn't find adb, and so couldn't communicate with my phone. A completely fresh re-install of Android Studio didn't even help. I ended up manually moving the platform-tools one directory up and that fixed it:
% cd ~/Library/Android/sdk
% mv platform-tools platform-tools-bad
% mv platform-tools-bad/platform-tools .
I've just formatted and installed a fresh windows 10. Next, I downloaded Android Studio and didn't see the Android SDK option to install.
Android_Studio_Install_Option
I installed it nevertheless. Naturally, after I opened Android Studio, it opened a window saying that it needs Android SDK to work properly. I went to Android Studio homepage again, and downloaded
SDK Command Line
Extracted it to c:\program files\android . I opened Android Studio again and tried to pinpoint the tools folder inside c:\program files\android\tools as the location of SDK and received this warning:
not valid home for SDK
I typed CMD with administrator rights, entered the tools folder, and executed android update sdk and it downloaded some files and wrote after a while repositores.cfg could not be loaded.
I am out of options now. I need the SDK to compile ! I can't find an offline install on internet. How can Android Studio be installed without the SDK ? I do not understand... and before you ask, there's no android folder on c:\users\my_user\AppData\local ...is there a bug on the latest Android Studio install program? I can't have SDK already installed because this is a fresh install of windows 10. Help on this matter will be much aprecciated.
If you can open Android Studio then go to Tools --> Android --> SDK manager and you should be able to install or uninstall SDKs from there
I had similar problem. I had settings imported from my previous Android Studio installation and my Android SDK Location was set to a folder which was empty. I couldn't figure out how to download new Android SDK but after clicking "Edit" next to "Android SDK Location" (in Default Settings > Appearance & Behavior > System Setttins > Android SDK) Android Studio opened a dialog box where I could choose to install/update my SDK or just selected components of it.
I need to install some packages in Android SDK Manager, but in my SDK folder there isn't the .exe file (There is only the AVD Manager and the folders).
How can I find it? My SDK works normally with Android Studio, without problems, it's strange that SDK Manager.exe isn't there.
I had to install an older version
https://dl.google.com/android/installer_r24.4.1-windows.exe
and update it. Going from there worked
To open the SDK Manager from Android Studio, click Tools > Android > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool.
Check this link: https://developer.android.com/studio/intro/update.html#sdk-manager
I found C:\NVPACK\android-sdk-windows\tools\android.bat
When I ran it, it brought up SDK Manager.
Which was nice, because I couldn't find SDK Manager in the C:\NVPACK\android-sdk-windows\lib folder like I was told it would be there.
You can find Android SDK Manager.exe file in the following folder:
C:\Users[account]\AppData\Local\Android\sdk (sdk1 in my case)
You can tap on that and you will get the Android SDK Manager screen.
Go to android_sdk/tools/bin/ open cmd and type sdkmanager and hit enter you can use command prompt for it
You can find sdk manager under command-line tools, which you will have to download by clicking the configure drop-down link under the android studio start-up wizard.
C:\Users[account]\AppData\Local\Android\sdk\cmdline-tools\latest\bin
C:\Users[account]\AppData\Local\Android\sdk\cmdline-tools\latest\bin
I had trouble running from here because I didn't have the right permission. I was trying to update my SDK. I got it running from another folder on my system with the command line command:
"C:/Program Files (x86)/Android/android-sdk/cmdline-tools/7.0/bin/sdkmanager.bat" --update --sdk_root="C:/Program Files (x86)/Android/android-sdk/cmdline-tools"
On Visual Studio 2022 you can look under Tools/Android/Android SDK Manager
I have download Android Studio packed with the full SDK (build-tools, platforms, everything). Installed the studio (64-bit) on Drive C and the SDK in "AppData/local/Android/android-sdk" folder as specified by the installer itself.
Now when I run the Studio (with admin permissions) it still attempts to download everything, as if no SDK components were present on my PC.
Is there a way to tell the Studio where the SDK is? Or I have to re-download it all?? (I already have everything mentioned in the error message)
"The following SDK components were not installed: platform-tools, extra-android-m2repository, tools, addon-google_apis-google-21, build-tools-21.1.2, android-21, sys-img-x86-addon-google_apis-google-21, source-21,"
[The following SDK component was not installed: platform-tools]
I ran into the same issue and was able to solve it by updating the SDK from the command line.
Go to the location where your Android SDK was installed (possibly ~/Android/Sdk) and run:
./android update sdk --no-ui
There's no need to run it as root.
Then, on Android Studio, go on Configure -> Project Defaults -> Project Structure, and then point Android SDK Location to wherever it is located.
step1: just copy 21.1.2 folder and paste with name 21.1.1
step2 : open 21.1.1 folder and open "source properties" file with any text editor( notepad)
step3 : change pkg.Revision=21.1.1 save it
step 4: android studio
sudo chown -R <username> .android
as mentioned here, android sdk updater stores a copy of some xmls in .android/cache
So after you have set the permissions, the updater can store necessary xmls and download missing sdk components
I'm having trouble exporting my first APK in eclipse. When I click on finish, I get the message: No build tools installed in the SDK.
I've googled the problem but all the results say that i have to install Android SDK Tools, but I have it and it's been updated (22.0.1).
Any ideas?
Thanks!
EDIT:
I have ALL the packages installed but still the same error.
Ubuntu 12.04
Eclipse 3.8.0
JDK 7
From version 22 forward the build tools is a separate package. Open then Android SDK Manager and check Android SDK Build-tools and click install. The package will download and you'll be able to export/build.
If eclipse is pointing to the wrong Android SDK it won't find the build tools. If you're sure you installed the right build tools, it may be that eclipse is pointed to the wrong directory. So if you're on windows, in eclipse, goto Window -> Preferences -> Android, and check the field in "SDK Location" eclipse is looking for the build tools in a subdirectory of that folder. Goto that folder and run the SDK Tools.exe and install everything in that GUI and it should work. Otherwise, change the path to your other SDK installation.
Here's a kinda same tutorial for Mac:
Add SDK to eclipse and no Target