I am getting an "SDK is out of date" error. I've seen a few other posts mention something about editing a path variable but I'm not really sure what this means. If someone could explain what I need to do to get past this error I'd really appreciate it! Thanks
You need to update your default project settings. Go to File > Other Settings > Default Project Structure. Change the Project SDK setting to Android SDK. This should clear the error for all new projects.
Run ANDROID_SDK_DIR/tools/android and update Android SDK tools to version 22, Platform and Build tools to version 17.
Under Unix (Linux/MacOS X), this seems like permission problem. Someone who packed Android Studio, has the original files under non-root account. If you unpack it as root, the files and dirs has no permission for "other" (just for owner). The person who is packing Android Studio knows a lot about Android and Java, but not much about Unix permissions (uch!). There are two possible solutions:
a) unpack android-studio-bundle-...-linux.tgz as normal user, not as root (this has an advantage - you will be able to update Andriod Studio by clicking menu; but this is generally stupid because you are open to malware attack)
b) fix read permissions for files and dirs for whole android-studio directory with something like: chmod -R 755 /opt/android-studio (not ideal because all files has "x" then, but it works)
Related
I am having the damnedest time getting Flutter to find the SDK command-line tools. I am trying to install the latter by downloading the zip provided at that link and unpacking it in say ${HOME}/Android. This produces a tools directory, and if I run the executable
${HOME}/Android/tools/bin/sdkmanager
directly (whith any number of options, etc.) I always get an error as documented in this other post. The solution recommended there actually works: move the tools directory further down the tree to get the path
${HOME}/Android/cmdline-tools/tools/bin/sdkmanager
That new intermediate directory must be named cmdline-tools though; I've tried other things (Sdk, sdk_manager, etc.) to no effect: the same errors occur.
Now, poking around in the cloned Flutter repo, I see in the file dev/bots/download_android_sdk.sh that I'm supposed to have the executable
$ANDROID_SDK_ROOT/tools/bin/sdkmanager
This tips me off that in my setup I need
ANDROID_SDK_ROOT=${HOME}/Android/cmdline-tools
exporting that and running a bunch of sdkmanager installation commands (like say
$ANDROID_SDK_ROOT/tools/bin/sdkmanager platform-tools
and the like) I see that my ${HOME}/Android directory is starting to get populated with the corresponding directories platform-tools, build-tools, etc. So those newly-installed directories live at the same level as my $ANDROID_SDK_ROOT which remember, as I'm doing this, is set to $HOME/Android/cmdline-tools.
On the other hand though, when I then go look (in the same Flutter repo) in the file
packages/flutter_tools/lib/src/android/android_sdk.dart
I see that I'm supposed to have the directory $ANDROID_SDK_ROOT/build-tools. This is in direct contradiction with the previous observation that build-tools and the like are supposed to be at the same level as $ANDROID_SDK_ROOT, and not under it.
My problem is I don't know how to square this apparent self-contradiction in the Flutter codebase. Which is it? In my setup, is ANDROID_SDK_ROOT supposed to be $HOME/Android or $HOME/Android/cmdline-tools?
PS
I understand that $ANDROID_SDK_ROOT is supposed to be "the SDK installation directory", but in this context this tells me nothing: after all, installing SDK is precisely what I'm trying to do.
You got a couple comments on GitHub as well, but just be aware that the files in the dev/ folder in the Flutter repository are mainly intended for CI purposes and for people who are developing the Flutter framework itself.
The scripts you're pointing out are actually stale files that used to help set up some tests we ran on CI. We now set those tests up differently, but forgot to delete the files - so thanks for pointing this out, they're soon to be gone!
The best way to set up your Android SDK is by following the instructions at the Android Studio site. You can either use Studio to do it, or just download the SDK bundle(s) themselves.
I rarely do something for Android so I'm a bit confused. While back there were two type of installations - Android Studio and just Android SDK. I have IDEA so I don't need Studio. Typically I download SDK that have UI tool to download its components.
I just got https://dl.google.com/android/repository/tools_r25.2.3-linux.zip and I can't see UI SDK Manager in it. There is bin/sdkmanager shell script. But it's kinda inconvenient for my purpose because going through output of --list, copy-pasting packages names and running sdkmanager would take too much time.
What's the way of installing this quickly now ?
PS. I'm on Ubuntu 16.10 in case it matters.
PS2. I just tried sdkmanager "platforms;android-25" as per documentation but it gave no output after me agreeing to terms. Where did it install SDK files? Did it even install it? Amazing.
Looks like I'm not the only one who had to deal with this idiocy. The way to install it
Unpack zip to some /parent folder so it has /parent/tools. I extracted content of zip's tools to /androidsdk and it was mistake. Script couldn't find it.
Set ANDROID_HOME to /parent folder.
Run /parent/tools/android sdk to see SDK Manager's GUI.
Google, was it hard to leave script that does the above in installation zip so people don't need to waste 40 minutes googling around ?
Officially GUI is gone, but pleasant people saved the last of it for us:
installer_r24.4.1-windows.exe
According for this announcment Google doesn't intend to support ADT pluging for Eclipse since June 2015, and so as GUI for ADT at all. They explain the decision with an entire switching to Android Studio. There are no links on official Android sources where to download last GUI version, because they find it as having potential security bugs.
So you have chance to download the last saved version, till the link will not be changed. If it already happened try to search by tag.
Thank to Losin' Me for links:
Windows (No installer): dl.google.com/android/android-sdk_r24.4.1-windows.zip
Mac OS X: dl.google.com/android/android-sdk_r24.4.1-macosx.zip
Linux: dl.google.com/android/android-sdk_r24.4.1-linux.tgz
Found on web.archive.org
Late to the party, but you can download v24.4 installer like the good old day here. It will update itself to v25.x and everything works as expected. Also a big ef'u Google.
Update 2021-07 : This tool does not offer build tools version >= 30 and won't show newer packages anymore
Since Android released build tools 25.3.0, they removed android CLI command and replaced it with avdmanager and sdkmanager located inside your $ANDROID_HOME/bin/tools
Run this command to get a list of available packages in sdk-style path:
sdkmanager --list
Run this command to install a specific image: sdkmanager --verbose "system-images;android-19;google_apis;x86"
From the command line, just type
tools/android sdk
and the usual GUI for the Android SDK will be prompted.
Hope this helps
If You have Android Studio, you can point your sdk manager in Android Studio to where you just installed your SDK. You can manage it from there. That's what I had to do. The command line was so tough for me as I didn't get the full package names when running sdkmanager --list command
Here is the link for download android sdk with GUI for windows, linux and mac:
Uncompressing and put the folder named tools inside androidsdk directory, search for android.bat: it's open GUI in windows.
Download packages and develop apps.
For using with Xamarin, The official Xamarin SDK Manager is now available for Visual Studio 2017 and above. It can be installed from under "Cross Platform Mobile" workload in the Visual Studio Installer. It replaces Google's standalone SDK Manager (which was deprecated in version 25.2.3 of the Android SDK Tools package).
I am sorry for bumping a necropost. But I have just released a simple Android SDK GUI. Maybe this little weekend project could save some people from headache of using sdkmanager command line or downloading android-tools twice.
You could check my project at AndroidGUI.
Fork as you please or better yet send me PR. Any help would be very much appreciated.
PS: It would be very useful if somebody could point me to the latest sdklib-*.jar source code. So that I could interface with Android SDK directly.
In the tools directory search for ' android.bat ' file and run it , GUI for SDK manager will open .
For all Windows users: I just made a "porting" of the old GUI executables...
although porting is a big word, I just changed the executable so it would read andoid_gui.bat instead of android.bat, and added that file and some required libs (although I think only archquery.jar is needed, I also put sdkmanager.jar, sdkstats.jar and sdkuilib.jar; it seems to work even without them so let me know if they are not needed)
Just extract it in the SDK directory
Download here
I have downloaded the Android Studio but when I want to create a new project, an error pops up saying "Your Android SDK is out date or missing templates..
How do I fix this project, or how do I update the SDK in the Android Studio?
Click here and update your SDK ;)
You can update your sdk in many ways.
1. Download sdk from developer site.
SET:file->project Structure->in android SDK section set custom path of sdk
2.Tools->Android->SDK manager update sdk
This seems like permission problem. Someone who packed Android Studio, has the original files under non-root account. If you unpack it as root, the files and dirs has no permission for "other" (just for owner). The person who is packing Android Studio knows a lot about Android and Java, but not much about Unix permissions (uch!). There are two possible solutions:
a) unpack android-studio-bundle-...-linux.tgz as normal user, not as root (this has an advantage - you will be able to update Andriod Studio by clicking menu; but this is generally stupid because you are open to malware attack)
b) fix read permissions for files and dirs for whole android-studio directory with something like: chmod -R 755 /opt/android-studio (not ideal because all files has "x" then, but it works)
Had a similar issue in linux. I am new user to android without any projects, I followed the instructions in https://developer.android.com/sdk/installing/adding-packages.html , Once I got to "In Eclipse or Android Studio, click SDK Manager in the toolbar", I noticed that from the welcome screen configure> Sdk Manager was greyed out. To solve,closed the program and relaunched as a sudo/superuser. Then go to Project Defaults> Project Structure. In the Android SDK location field go to "directory-where-you-installed-android-studio/android-studio/sdk'. Once done, click ok. Then close and relaunch the program once more. The SDK manger should be active now
I am doing Android Development using Eclipse. I have downloaded all the required software, but I am having the same problem as discussed in "Unable to set up Android Target in Eclipse". Now I do not find the solution of the problem on that discussion so let me rewrite the problem again,
When I load Eclipse and create a new Android project, it keeps on waiting for the ADT to load. To figure out what is wrong I went to preferences and tried to put the location of the ADT I created in it but it keeps giving me this error when I put the address of ADT,
Could not find folder 'tools' inside SDK 'E:\Documents and
Settings\me\android-sdks'..
How can this issue be resolved?
I created the folder tools manually, now I am getting this error:
[2011-12-24 15:23:56 - DDMS] DDMS files not found: E:\Documents and Settings\me\android-sdks\platform-tools\adb.exe E:\Documents and Settings\me\android-sdks\tools\hprof-conv.exe E:\Documents and Settings\me\android-sdks\tools\traceview.bat
[2011-12-24 15:42:06 - DDMS] DDMS files not found: E:\Documents and Settings\me\.android\platform-tools\adb.exe E:\Documents and Settings\me\.android\tools\hprof-conv.exe E:\Documents and Settings\me\.android\tools\traceview.bat
If you install Eclipse properly then:
Start Eclipse
From the menu bar, select Window > Preferences > Android
For Android location, browse the folder in which you install Android SDKs.
In Android SDKs folder, rename the folder platforms-tools to tools.
Select the folder Android SDKs through Preferences dialog box.
If I get you correctly you have just downloaded Android sdk and want to configure it working with Eclipse. I think you miss one step from the installation of the sdk:
1) you download it
2) you extract it somewhere
3) then go to the specified directory and start AndroidManager (or was it just android??). There you specify you need platform-tools and the manager will configure that for you. This will also provide you with the 'adb' executable which is crucial for the Android developement.
After that you install ADT (which I think you already did) and from Eclipse preferences -> Android options you get a place to specify where your android-sdk is. If you specify it after you did the 'step 3' you should be good to go.
I am not 100% sure I got it correctly and what your state is, so please forgive me if my comment is irrelevant. If I am wrong I will be happy to help if you provide some more details.
Something I am completely sure is that you shouldn't need to create the folder 'tools' by yourself.
PS: The description I gave is for newer versions of android sdk, but if you are encountering a problem with older version I will recommend you to start from scratch with newer version. It shouldn't take you that long time.
This can also happen due to the bad unzipping process of SDK.It Happend to me.
Dont use inbuilt windows unzip process.
use WINRAR software for unzipping sdk
By default it looks for the SDK tools in "C:\Documents and Settings\user\android-sdks". Some times we install it at another location. So you just have to select the correct path and it will done.
I faced similar issue when the SDK tools installation was failed during the initial setup. To resolution is to download SDK tools from Android Developer Site
Expand "USE AN EXISTING IDE" section and download standalone SDK tools
Choose your destination as (%HOMEPATH%\android-sdks)
Now start Android-SDKs folder and run SDK manager
If you get the "Failed to find DDMS files..." do this:
Open eclipse
Open install new software
Click "Add..." -> type in (e.g.) "Android_over_HTTP" and in address put "http://dl-ssl.google.com/android/eclipse/".
Don't be alarmed that its not https, this helps to fetch stuff over http. This trick helped me to resolve the issue on MAC, I believe that this also should work on Windows / Linux
Hope this helps !
In my case i was using Ubuntu. Where the was two directories one was /android-sdks
and /android-sdk-linux. I used the second one it works for me :)
My solution was to remove the Eclipse ADT plugin via menu "Help > About Eclipse SDK > Installation Details". Eclipse will restart.
Next go to Menu "Help > Install New Software", then add the ADT plugin url "https://dl-ssl.google.com/android/eclipse" (or select the existing link from the dropdown).
This will re-install the latest ADT, including the DDMS files.
For me it was a simple case of specifying the path to the 'sdk' subfolder rather than the top level folder.
In my case I needed to input
/Users/Myusername/Documents/adt-bundle-mac-x86_64-20140321/sdk
instead of
/Users/Myusername/Documents/adt-bundle-mac-x86_64-20140321
"Error executing aapt. Please check aapt is present at ... /platform tools/aapt"
I am trying to build Android apps using Eclipse Android SDK in Ubuntu.
I installed Ubuntu 32bit 10.10 in two different computers and I can't fix the problems now.
I installed Eclipse, ADT plugin, Android SDK, all Android APIs, ...and also I have set Preferences to Android SDK folder. I also carefully put all SDK and Eclipse in my username folder to make sure I fully have right permission.
I also try to use google to find similar cases. Most cases use 64 bit Ubuntu.
I also fix the GNU compiler and some instructions here.
But now I am really hopeless. It looks like this problem is really serious.
I really appreciate all of your helps.
Thanks so much
ddienle#gmail.com
ledangdien#yahoo.com
Thanks again
*Also, I try to restart my Computer many times and try to install many different version
of Eclipse. Each time I set Preferences for Android SDK, the following message box occur
"Failed to get the adb version: Cannot run program "/home/sdc/android-sdk-linux_x86/platform-tools/adb": java.io.IOException: error=13, Permission denied"
Now I try everything but they don't work*
Have you tried the adt-eclipse-bundle?
https://developer.android.com/sdk/installing/bundle.html
You have some wrong permissions. Perhaps some files are owned by the root user because of using sudo when it wasn't needed. All files in your home directory should be owned by your user. You can fix that with the following:
sudo chown -Rc $USER:$USER /home/sdc/