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
Related
While installing Android studio, I got no path for Android sdk says "android sdk is missing" and it pointed to default path /Users/{username}/Library..
When I go physically to the location, cannot locate sdk.
It's my corp device and I cannot setup android studio.
Tried downloading command line tools from below:
https://developer.android.com/studio?pkg=tools
but not sure how sdk folder looks like. Need guidance
NOTE: I have ksh (.kshrc) file on my device.
If You are looking for installing only android SDK. You can follow any of the methods below.
Install the Android studio (Manually)
download without android SDK Android Studio bundled zip folder and install the same from here - https://developer.android.com/studio#downloads
User Homebrew and install android sdk - Easiest and preferred option!!!
you can use Homebrew to install the Android SDK.
Install Homebrew from here (just follow the commands via MAC Terminal) - https://brew.sh/
Once you have installed HomeBrew run the following commands:
More details here - https://formulae.brew.sh/cask/android-sdk#default
brew tap homebrew/cask
brew install --cask android-sdk
This will install the Android SDK tools in
/usr/local/Cellar/android-sdk/<version number>
Use this path to update your SDK path in android studio as shown in the post above. Hope this helps.
Go to File -> Project Structure and check the Android SDK Location:
Then Android Studio -> Preferences -> System Settings -> Android SDK (just type sdk in the search bar).
Download SDK Platforms and SDK Tools:
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
Maybe a simple question but i can't seem to get it fixed.
I want to Build my Application (for android)
After i connected the SDK and JDK path's i press build
The following message pops up.
I had the same problem.
fixed it by downgrading the sdk tools.
Delete android sdk "tools" folder
: [Android SDK root]/tools -> tools
Download SDK Tools:
http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip
Extract the folder to Android SDK root
Build your project
found it:
Download tools r25.2.5
Google
Change your tools folder to toolsXXXX (because you need it for Android studio)
unzip the tools r25.2.5 in the SDK location
Works fine now. probably something with an update...
Below error displays during installation:
Done loading packages.
Preparing to install archives
Downloading Android SDK Platform-tools, revision 26.0.2
Download interrupted: Connection to https://dl.google.com refused
Done. Nothing was installed.
Preparing to install archives
Downloading Android SDK Platform-tools, revision 26.0.2
Download finished with wrong checksum. Expected 98832431e339c82be1fe910a733a3782071200fd, got aa3ef6f18eff4b8f12dbdf980647a6ce6c2ebe8c.
Done. Nothing was installed.
I had to install it by myself.
Download link:
https://developer.android.com/studio/releases/platform-tools.html
Select the zip file SDK Platform-Tools for Windows and extract it.
Move it into your android directory, in my case it was: C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.27659.1188.
Now you have the new directory: C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.27659.1188\platform-tools.
Run SDK Manager.exe again.
In my case, the error was gone. I had to install 4 packages first and then I had to install 3 packages after that. Now it run perfect.
You can just extract the archive the SDK Manager already downloaded:
Go to your android-sdk directory
Enter the 'temp' folder
Extract the 'platform-tools_r26.0.2-windows.zip' to the android-sdk root directory
But this makes the checksum pointless, it might be better to wait until it is fixed unless you need the new version now.
I resolved this by first removing the Android SDK Platform-tools using the Android SDK Manager. Then I used the direct download link provided by Umair Malhi above (https://dl.google.com/android/repository/platform-tools_r26.0.2-windows.zip) then extracted the platform-tools folder into the SDK folder (which in my case is C:\ProgramData\Microsoft\AndroidSDK\25). If you rerun Android SDK Manager, the issue is resolved.
I had the same issue, after running Visual Studio as an Administrator then the updates went through successfully.
EDIT: Newer versions of VS now prompts you to run VS in Administrator mode when you click on Android SDK Platform Tools.
I had the same checksum issue, until I just updated to Android Studio 3.0. Now the Android SDK Platform-tools 26.0.2 downloads and installs as expected. Not sure if the issue still exists for Android Studio 2.x or it was fixed separately, but it's worth trying again now.
In my case all I needed to do was run Android Studio as administrator and the the packages installed with no problem.
I have the same problem, in my case I hadn't write rules to platform-tools folder. So I gave me write rules with the command:
sudo chmod -R ugo+rw
This is the webpage showing from where I downloaded the SDK:
On extracting the .zip folder, and opening the 'tools' folder, all I can see in an emulator.exe, mksdcard.exe and a host of .bat files (as shown below).
How do I proceed?
In IntelliJ IDEA 2017.1 and 2017.2 setting up Android SDK from scratch is complicated. I would recommended to install Android Studio and manage SDK platform there. This problem will be addressed in one of the nearest updates.
If you are brave enough, it's still possible to set it up without Android Studio using the tools\bin\sdkmanager.bat command line tool. GUI version of the SDK Manager is deprecated (no longer available in the SDK download). Standalone SDK can be downloaded here. Look below the Get just the command line tools section.
So, you will need to install at least one platform version.
First run the update to ensure you have the latest tools:
sdkmanager --update
Now you can list the packages available for installation:
sdkmanager --list
To install Android Platform: (Edit April 2022: need quotes now)
sdkmanager "platforms;android-26"
To install the current build tools version (optional):
sdkmanager "build-tools;26.0.0"
At this point you should be able to add Android SDK configuration for the installed platform version in IntelliJ IDEA like this:
You will also have access to Android SDK configuration UI where you download additional components and perform updates (just like in Android Studio):
As Karan Sharma mentioned in this post.
To add an existing SDK, you should close your project if you have any open one.
Then from the Welcome page select Configure -> Project Defaults -> Project Structure
And then from the Default Project Structure window and from the left side, select SDKs and then the plus button from the toolbar, and from the menu select Android SDK
And then give the address to the location where your Android SDK files are in, and hit OK.
Thats it!
Now it should be working for you!
You can also install the SDK in the IDEA GUI. It says in the tutorial,
If you don't have the Android SDK configured, IntelliJ IDEA will
detect this and prompt you to download it:
launch android executable and install the platforms and build-tools.