while installing Android studio SDK in ubuntu 14.04, 64 bit using the wizard; I encountered this error
The following SDK components were not installed: sys-img-x86-addon-google_apis-google-21 and tools
It occurred during "Downloading Google APIs Intel x86 Atom System Image, API 21, revision3"
Can someone please help me where the possible error is.
This solution helped me on Ubuntu 20.04 when I already installed the AS, but couldnt install packages in AVD Manager when I wanted to create a virtual device for the emulator, getting a very similar error. Maybe this will help in your case:
Delete the .downloadIntermediates/ directory from your SDK location /.../Android/Sdk/ (usually the path starts in your home folder).
From what I understood, this folder contains logs for your downloads,
and if something goes wrong, this can stop AS from
resuming/downloading new things properly. Don't worry about deleting,
this folder will recreate itself automatically and it doesnt affect
the program
How to delete it via the console:
Open your terminal, go to your sdk folder, if it's a default location in home folder the command is as follows:
cd Android/Sdk
Then check if the folder ".downloadIntermediates/" exists. Run this command and look for it in the list:
ls -la
If it's there, then proceed with removing it:
rm -r .downloadIntermediates
Now you can run the "ls -la" again to see if it is removed successfully.
Launch Android Studio again. Now try installing all the packages you need, they should install with no errors. Hope this helps in your case! :) And in any case, if nothing else works, an uninstall and clean install can be a good idea.
I've been working with Eclipse 4.2 (Juno release 20120920-0800) on OS X 10.8.2 for a few weeks now, building apps for Android 3.0 and above. I have a quad core i7 MacBook Pro with an SSD, so performance is not an issue. Everything was fine.
At some point I imported an Android project that required Android 2.2, so I installed that using the Android SDK manager (v.21). Ever since then, working with Eclipse takes forever. First of all, it will print the following in the status message at the bottom right:
Android SDK Content Loader: (0%)
This takes two minutes or so. The specific message is "Check Projects" and while it's doing that, all Android projects are highlighted in red, because the Android resources aren't found. Then, it proceeds with:
Loading data for Android 2.2 (100%)
This will stay for a couple of minutes. Then it goes on to do the same with Android 3.1 and other SDK versions I have installed. It basically hangs whenever the first autocompletion kicks in (e.g. after typing System.) or when I access the Android preferences before it has loaded.
Here's the state of my Android SDK:
What I've already tried:
Reinstalling the Android SDK (via Homebrew), thus deleting /usr/local/Cellar/android-sdk completely.
Reinstalling the AVD plugin (v.21) from scratch.
What can I do to find out about the source of these problems and get back to a nice and clean state?
This is the solution I found which works correctly:
Make sure that eclipse is not active. If it is active kill eclipse from the processes tab of the task manager
Open %USERPROFILE%/ on Windows or simply ~ on Linux/OS X (You can locate this folder from the Desktop)
Go to .android folder (This may be a hidden folder)
Delete the folder cache which is located inside .android folder
Delete the file ddms.cfg which is located inside .android folder
Start Eclipse
Hope that this will work for you.
Same problem, stuck at 0%. Ran
/Applications/eclipse/eclipse -clean
and everything worked great again. Modify that path for linux boxes.
Update (from the remark from #Janusz )
For mac users with eclipse outside application directory your clean command will looks similar to:
path/eclipse/Eclipse.app/Contents/MacOS/eclipse -clean
Go to your workspace directory \workspace\.metadata\.plugins\org.eclipse.core.resources\.projects and delete all the projects in there.
Note: You are not going to lose your projects
I have used some other answers here to fix this problem but I came across it again recently, and none worked. I didn't want to re-install or delete my workspace, so I finally found one that did work that might help someone else. Delete the file:
/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
You can make a backup first, if you like. It stores your workbench settings (perspective state, file paths for menu options, etc.) But eclipse loaded and I didn't have to re-install anything like some answer suggest. And I haven't seen this anywhere.
I know that this has been resolved but I thought I would share this link:
Solution One
Often times, this problem can be network related. Check if your
network is behind a proxy. If so, you need to configure proxy
on Eclipse. For that, go to “Windows” -> “Preferences” -> “General” ->
“Network Connections”, and fill in your proxy info. Restart Eclipse
after that. Conversely, it’s also possible that you have configured
proxy on Eclipse before, but that you are no longer behind proxy. Make
sure to disable proxy then.
Solution Two
Another solution is to clean up project-specific meta data directories
which are stored under your workspace directory.
$ cd workspace/.metadata/.plugins/org.eclipse.core.resources/.projects
$ rm -rf *
Restart Eclipse.
Solution Three
Check if an adb process is running. If so, kill the adb process, and
restart Eclipse.
Solution Four
Try deleteing the contents of the cache folder located in user profile under .android\cache
Try deleteing the ddms.cfg located in user profile under .android
All the other solutions did not work for me so I simply deleted all the .log files inside the folder [workspace]/.metadata and it worked again!
It turns out this problem indeed occurs when your internet connection is flaky, slow, etc.
As soon as I got back to my normal internet connection, the content would load fine again, within less than a few seconds.
I have tried all the solution but i didn't get solution. After that i have disconnected Internet and deleted ddms.cfg from .android folder -> open eclipse -> dialog of statistics send to Google? -> Selected NO and Finally Worked for Me.
Edited:
I have tried eclipse -clean command in Command Prompt and that also worked for me.
Note: For eclipse -clean command first you have to select path of
eclipse folder where you have placed.
Thanks.
I'm on a Mac and using ADT, can confirm that the following worked for me.
cd workspace/.metadata/.plugins/org.eclipse.core.resources/.projects
rm -rf *
No amount of restarting the Eclipse, or rebooting the Mac was helpful. It seems that Eclipse gets into this stage because of stopping abruptly. I had to force boot my Mac and this issue seems to be happening since then.
My solution:
Install all the Docs in the sdk manager.
I prepared little script to make it easy dealing with this reoccuring and very annoying problem. Open Terminal, then:
open ~/.bash_profile
at the end of the file paste this function:
function eclipse-clean() {
echo "removing ddms.cfg file"
cd ~/.android/
rm ddms.cfg
echo "removing cache"
cd cache/
rm -rf *
echo "done! you can open eclipse now."
}
then all you have to do now is:
source ~/.bash_profile
and whenever you are stuck just type in Terminal window:
eclipse-clean
just right click on eclipse and run it as a administrator i was also having the same problem after this it was working fine actully sometimes the windows do not give the permission to access to sdk in normal user so you have to give admin permissions in order to work android sdk or content loader
this approach:
shut down eclipse then go to YourWorkSpace\.metadata\.plugins\org.eclipse.e4.workbench and remove "workbench.xmi", now restart eclipse.
I made this batch file to fullfill the task explained by slhck's answer for Windows systems:
#echo off
set ECLIPSEFOLDER=%CD%
cd /D %USERPROFILE%/.android
rd /s /q cache
del ddms.cfg /f
cd /D %ECLIPSEFOLDER%
eclipse -clean -refresh
exit
I explained such approach in this post on my blog.
All the above solutions didn't work for me.
In eclipse Under Problems Tab check errors-
You might see the unable to delete file and project path name.
Now Go to your workspace directory -
Check project.properties for all the project stated under problems tab and check
target=android-21
The target value is valid and exists in your android-sdk/platforms/ folder
In my case target=Google,Google-Api-16 was causing the issue. Replace that and it solved.
Worked! All I did was to open Terminal and typed:
cd documents/workspace/.metadata/.plugins
and then... typed
rm -rf
... in that .plugins category.
There are various reasons for this problem, and each have a different solution.
For a Linux environment, I made a alias to take care of most of these as they happened overtime. To have all of those in one place, you could try this:
Add the following in your ~/.bash_aliases file.
alias eclipse='rm -rf ~/.android/ddms.cfg;rm -rf ~/workspace/MyApps/.metadata/.plugins/org.eclipse.core.resources/.projects/*;mv ~/workspace/MyApps/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi ~/workspace/MyApps/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi.bkp;rm -rf ~/.android/cache/;cd ~/Desktop/adt-bundle-linux-x86_64-20140702/eclipse;nohup ./eclipse & cd -;'
Refresh source using source ~/.bash_aliases
Note:
~/workspace/MyApps is my workspace, you'll have to configure your's accordingly.
~/Desktop/adt-bundle-linux-x86_64-20140702/eclipse is the location of my eclipse executable,and you'll have to configure your's accordingly
So this is what got me working again:
Resolved the problems with the different versions related to android-support-v4.jar. They were mismatched which causes problems if projects are related anyway.
The second one is not that obvious: I restarted the IDE from the shell, providing the $ANDROID_SDK_HOME - Environment variable.
This got me a step further but the ide hangs on a different location.
Providing $ANDROID_HOME finally got me all the way up again.
BTW: After this procedure it was not necessary in following starts of the IDE to set the environment variables again.
I have a problem with AVD. If I launch it from eclipse, load well but doesn't appear in screen. After that, I try it from terminal but I got the "Segmentation fault" message. Reading another topic I read that it is problem with 20 version of android SDK and to fix it, I should try: .../tools/emulator-arm #nameAVD. It works.
But I still have a problem, I need launch AVD from eclipse to debug applications! Can somebody help me?
Thak you a lot.
Can you tell us a bit more about your system, build, and what version of Android/Eclipse you are using?
if not, try uninstalling and re-installing eclipse, but use the Eclipse Classic version from http://www.eclipse.org/downloads/
then if it doesn't work still, try to delete and redownload the android SDK.
if that still doesn't work then chances are you have something wrong with your system settings
======================
EDIT*** here is a possible TEMPORARY solution..
only use Eclipse to clean/Build your projects, and use your terminal to install your app onto your emulator.
to build an APK without running, right click on your project, go to "Android Tools" and hit "Export Unsigned Package", which will prompt you to store the APK on to some place. Then, open up your AVD emulator and terminal. on your terminal, "cd" into the directory that you saved your APK file (like inside /...../Your Project/bin/) and then run the terminal command "adb install yourAPKfileName.apk"
this will automatically install the newest APK to your emulator and run it. since this process for building is a little slower than usual, i would recommend only building/running when you need to, and always export the APK to the same place, and have your terminal open to the same place, so that when you press "up" on the terminal, it repeats the last command you used :)
I have 64bit system and have downloaded SDK and the manager to learn Android development.
As you can see I am neewbie and I am having few hiccups.
I have downloaded and succesfully installed the plugin for Eclipse.
But when it comes to manager when I am downloading basic packages, I get the error in the screenshot.
I have made sure to fetch the url using http.
the error seems the installer is not able to access its own folder, which is quite surprising.
Are there any permission which I have to change?
I have also included a screenshot for the convenience:
Screen shot http://img842.imageshack.us/img842/1108/capturempk.png
Just two quick things to check:
Make sure you are not running this from within your "Program Files" folder. Run it in Documents or somewhere as Vista & Win7 try to protect any Program Files and folders.
Right click the application and look for the option to always run it as administrator. Even in Linux based operating systems you need to run this updater as administrator some times.
These are just two quick solutions, just in case.
New to android. Running Eclipse on Ubuntu 9.10 with Android SDK plugin installed and working. Trying to get some code samples from http://developer.android.com/resources/samples/get.html , and following its procedure to load said samples in Eclipse yields:
Parent of resource: /home/user/android-sdk/platforms/android-4/samples/Notepad/.project is marked as read-only.
chmod is not recursive, so I entered ~/android-sdk/platforms and "chmod 777 *" ie. all folders in /platforms. Still doesnt work. Appears to be be a bug in Eclipse that wants to create the project in the SDK folder rather than under ~/workspace.
This is an old thread, but still an issue with the newest release of ADT.
To get around the issue and avoiding having to chmod the entire sdk platform, you can just change ownership of the project itself to your profile instead of the default root profile it is set to.
if you issue:
sudo chmod -R yourProfileName YourProjectDir/
Where yourProfileName is your user profile name, it should resolve the issue. If you are unsure what your profile name is, it is usually the name of your home directory in OSX. In windows, you should be able to find it somewhere under control panel -> profiles.
The far better solution is to select a choice such as "copy into workspace" when creating/importing the Eclipse project.
This has the benefit of leaving the original source files in a clean state, where you can easily refer back to them if your modifications to an example break it.
Whoops. Chmod does have a recursive functionality (of course):
chmod 777 android-sdk -R
but that seems to have borked the Eclipse workspace.