new AVD can't click on OK button, not system image [duplicate] - android

This problem sounds similar to a few others, except in my case the OK button is not grey-ed out. But for those who would rather not click the links...
Trying to create or edit an AVD from within Eclipse, after entering my settings, the "OK" button seems to be "clickable", but when I click it absolutely nothing happens.
I've made sure I have the appropriate system images installed, and that the target platform matches the API being used. Clearly a CPU has been chosen, skin set, etc... all the things that would make the OK button greyed out, which it's not.
I can create/edit AVDs if I run the AVD manager from outside eclipse, so this isn't the end of the world, but I feel there's a solution to this particular problem and I want to help solve it.
I've tried running eclipse as an administrator (that's what stopped the AVD manager from crashing outside of eclipse). I've tried just waiting around, or clicking multiple times. Looking at the Task Manager, no new processes begin when I click OK, nor does eclipse's CPU or RAM usage increase at all. The "Edit Android Virtual Device" window doesn't even go away.
Any clues?
(Running Indigo with the ADT plugin, btw, not the bundled version, which failed to work in a different way. Java 1.6.0 45. Windows 8, unfortunately. Plenty of RAM etc)

THIS IS A POSSIBLE WORKAROUND FOR BUGS IN ADT 22.6.0 ONLY, THESE BUGS SUBSEQUENTLY FIXED IN FOLLOWING BUILDS
Download and install new ADT v22.6.1 from here (zip) or use SDK manager to update
Seems like some bug from Google side, this problem found after "ADT 22.6" update. Widely reported on "Android Open Source Project - Issue Tracker" and nobody properly answered it yet.
However I was partially successful to create an AVD by opening "AVD manager.exe" from "Android SDK" for creating new AVD try to open directly AVD Manager.exe in SDK folder.
May be we have to wait for any conformation from Android community
Worked for me, sort of.. .
(Windows 8.1 Pro 64 Bit, Java JDK 1.7 Update 25, Eclipse Standard Kepler Service Release 1, Android Development Toolkit 22.6.0.v201403010043-1049357)
Update 1
Further research revealed that launching AVD Manager from SDK Manager (Tools --> Manage AVDs...) also works without any problems.
Update 2
More bad news is AVD creation not working from command line tool too.
Update 3
Assuming some parameter passed during launching AVD manager from Eclipse causes these problems
Update 4
Updated Java to JDK 1.7 Update 51 and Eclipse Standard SDK to Kepler Service Release 2 their latest and no resolution to the problems. Also tested under Debian and same results obtained.
Update 5
At https://code.google.com/p/android/issues/detail?id=66661 android project members conforms the problems and promises to fix by upcoming versions of ADT (22.6.1 - 22.6.3). At the mean time I would suggest to roll-back ADT to a lower version version 22.3.0
To uninstall current ADT go to
Help --> About Eclipse --> Installation Details --> Android Development Tools --> Uninstall
I may suggest uninstalling whole packages from Android (DDMS, Hierarchy Viewer, NDT, Traceview, OpenGL ES..etc..) to avoid any possible compatibility issues and install a fresh new ADT from above link through archive installation method.
Hope this will solve this problem temporarily. And wait for new release of ADT here.
Update 6
New ADT, version 22.6.1 is out now which will solve these problems

To elaborate on the statement "I can create/edit AVDs if I run the AVD manager from outside eclipse" in the OP:
Run the following on the command line
<android-sdk-location>/tools/android avd (on Linux in this case)
This launches the same AVD window you see when you click the AVD Manager icon in the eclipse toolbar. But this instance of the AVD manager does not have the bug, and you can create and run emulators as you did before the bug was introduced.

1 minute solution
I used a quick workaround where I cloned a device that already existed. The Clone button worked and I was able to successfully edit the clone.
Steps:
Select a Device by Google
Click the "Clone..." button
A window will pop up, click "Clone device"
Select the newly cloned Device, it should say "... by User"
Click the "Edit" button on the side
There you have it, you now have your own custom virtual device

Update and Solution: AsYashwanth Krishnan said, The bug in question is now fixed in later versions. I tried ADT 222.6.1 and ADT 22.6.2 , and they did not suffer from the bug of not not being able to create or edit Android Virtual Devices. The direct solution is to update you ADT to latest version, The workaround written below is left only for historical purposes.
Historical Workaround As #Yashwanth Krishnan said, this is a bug in ADT plugin 22.6; so best workaround is to rollback. for those asking how to rollback, here is a step-by-step guide:
First: Uninstall ADT plugin and all related plugins for android:
help->about
Installation details
Select android plugins and press uninstall button
Restart
Second: Download ADT 22.3.0 Archive from https://dl.google.com/android/ADT-22.3.0.zip
and install it
add repository from archive on local disk
Select android plugins

INFO:
I WAS able to create an AVD successfully after clicking OK several times and modifying some of my settings as a test.
I tried yashwanth krishnan solution and tried to open the AVD Manageer.exe directly without success. The manager will not open directly for me on Windows 8 x64. It tries to open, then shuts down immediately...

I met this issue too . The issue occurs in the latest version 22.6 which was released in March . Meanwhile I did the testing in 22.3 , the issue was not found .
So that I suggest that rollback the ADT to 22.3 and wait the new fix for 22.6

I banged my head on this for several hours until I found out that the default location was C:\username path\SDKs or something, where Android was installed on my system to D:\sdks\android_sdk_windows. So, changing the Eclipse Android directory to D:\sdks\android_sdk_windows fixed it.
I also heard that it may help things if you install the Android SDK to a path without spaces.
Hope this helps someone keep some hair.

Today I ran into the same problem after installing Maven. I messed around with different Path settings to get it to work and I ran into issues. I was also trying to install the google server for GCM. Somewhere in what I was doing I corrupted the Android Virtual Device Manager. I searched S.O. for an answer, then I decided to follow the first rule of TechSupport. I reinstalled the tool kit!
I went into the SDK manager and I uninstalled the tools (by clicking the Tool checkbox). It took several minutes to delete them all. Then I reinstalled the Tools which took about ten minutes. I rebooted Eclipse and the AVD and worked just like it did yesterday!
This time it only took a total of twenty minutes to fix.

Per the release notes, this problem has been resolved in revision 22.6.1, which is now available for download.
Updated your Android SDK Tools to 22.6.1 in Eclipse by selecting Window > Android SDK Manager and follow the prompts to install the update.
After that update finishes, select Help > Check for Updates and follow the prompts to update the appropriate Eclipse components.
After completing these updates, I tested the AVD functionality and it appears to be working properly.

i just copied the avds from a different system as descriped here:
Android - How to copy the emulator to a friend for testing

I faced the similar issue. I am using 23.0.2 version of android SDK.
"OK" button was disabled, but then I went to the path where android SDK was installed. In my case:
C:\Program Files\Android\android-sdk\
and executed AVD-Manager.exe by right clicking and selecting Run as an Administrator, and it worked like a charm.

Sometimes the AVD cannot be created because of this following error while starting:
x86 emulation currently requires hardware acceleration!
I was also facing this same issue. If u are facing the same, then it can be resolved by opening SDK Manager -> Under Extra -> Installed "Intel x86 Emulator Accelerator (HAXM Installer). Then when creating the AVD, select the proper CPU. This should work. :-)

For those posting that we need to set the sdcard size: I tried that and many other settings, and none of that helps. I get the NoClassDefFound Exception mentioned by mogilka, in the Error view. No configuration settings are going to fix that. It seems a bad update was pushed

Give some value for your sd card. May be something like 100 or 200

Related

The ADB binary is obsolete and has serious performance problems with the Android Emulator (error)

Android Studio produces the following error:
The ADB binary at
C:\Users\username\AppData\Local\Android\Sdk\platform-tools\adb.exe is
obsolete and has serious performance problems with the Android
Emulator. Please update to a newer version to get significantly faster
app / file transfer
I tried to check at: SDK Manager -> SDK Tools -> Android SDK Build-Tools (link to that answer). But the last update has been installed already.
P.S. I know, such a question already exists (link to that question), but there I can't write a solution that helped me, because I don't have enough reputation points. So, I'll write here the solution, maybe it will help someone...
The Android Studio should recheck SDK (it should help, at least it helped me)
Go to:
SDK Manager -> Android SDK Location: (Edit) -> Next -> Next -> Finish
SDK Location doesn't have to be changed.
Open SDK Manager
Click on --> SDK Tools.
Check--> Show Package Details. (Look at the bottom right corner)
Under--> SDK Build-Tools, scroll to the bottom and check the last item. (when I checked it was 19.1.0)
Click on--> Apply.
A dialog box appears just click OK.
It begins to install.
After installation gets completed just click--> Finish.
in short, I also have that problem. I accidentally solved by switching the graphic card from Integrated to Dedicated Graphics Card on my laptop setting. That is it, no more error pop up.
in long, I was trying to the get the emulator run faster and less lag. I am using Android Studio 4 with Win 10 on lenovo notebook with Intel and AMD Graphics Card. I accidentally found this switching GPU method and it's work for me. I don't know why or how it is related to adb.exe. I tried to switch back and forth GPU several time to confirm it already.
Give it a try and kindly let me and other knows
Thank you
Fiddling with the SDK manager did not work for me.
Changing the emulator device Graphics from Automatic to Hardware fixed this issue for me.
This solved the issue for me
Using Android studio 4.2+
For Windows
go to File->Settings->Tools->Emulator->Tick 'Launch in a tool window' (option)
Apply
For Mac OS
Preferences->Tools->Emulator->Tick 'Launch in a tool window' (option)
Apply
Check Image

"The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22"

I'm Windows 7 64-bit user and I got Android Studio problem after I update the latest version of Android Studio and SDK components..
The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22
Please help me to resolve this problem. Thank you.
I had the same issue when trying to upgrade Android Studio from 1.1 to 1.2 on Mac OS 10.10.
I solved the problem by selecting custom installation instead of standard. Also we need to select the Android SDK Platform (Lollipop 5.1).
Choose the new UI Design >> next
Just try to cancel the "Downloading Components" from upper right
corner 'X' button.
A dialog box will appear then click OK (wait a bit for first time
launch)
I uninstall Only Android studio (keep the SDK and Emulator) and then reinstall it just android studio. took me 2 minutes and my android studio work again.
I had this same problem, but I'm a Linux user.
I resolved the problem by reattempting the installation with adminstrator privileges. [For those Linux users reading this, I ran studio.sh with sudo.]
I just click 'Retry' and it's ok! Also run on Win7 64-bit.
TRY BELOW SOLUTIONS.
SOLUTION 1:
-> Run Android Studio as Administrator (this is only required for first run or when any issues arise due to automatic updates on any run in future).
Though it shows API 23 is or any other updates are not installed (and wouldn't show any 'Retry' button), BUT still the download and installation of rest of the updates would proceed (you can see the download progress incrementing even after seeing the above errors). So, DO NOT ABORT the operation.
-> At the end of installation (after rest of successful updates are installed) it would this time display the "Retry" button to retry installation for API 23 or any other versions which had failed earlier. Then click the "Retry" button, it would work this time.
This would resolve your issue with successful installation.
-> Next time onward no need to run Android studio as Administrator, unless it does any automatic updates and shows similar issues.
SOLUTION 2:
-> Alternative approach is to install any updates (which ever failed in earlier attempt) from Android SDK Manager first and then later launch Android Studio (which would not need any check for updates and any additional installations).
To install any features or updates, run Android SDK manager as administrator (run as administrator is not mandatory for this but preferred to avoid any permissions related issues) and check the required options and proceed with the installation without any issues.
SOLUTION 3:
-> If still your issue is not resolved, then try the proxy solution as suggested by others or check your internet connectivity if it's working properly or not.
*Any of the above solutions should resolve your issues.
go to c->users->[Your user account]-> remove android 1.2 and restart the android studio
when it ask to import select first radio button which is import setting from previous config
there you go fixed
I am using Windows 7 Professional and I was having same problem #Bayu Mohammad Lufty not worked for me.
I simply delete .AndroidStudio1.2 from my C:\Users\UserName\ and restart my Android studio again.
It open Android Studio perfectly!
It configured everything again in next start :)
I'm a MacOS user.
I solved it by uninstalling Android Studio and reinstalling it again.
If you want to try this link helped me a lot.
Uninstall Android Studio MacOS (terminal)
When you are installing Android Studio, under Install type do not use standard setting, use custom setting instead, and check all the option boxes in the next step.
i have solve my same problem
i update my android studio, and i choose not to import my setting from my previous version than that problem appear.
than i realize that i have 2 AndroidStudio folder on my windows account (.AndroidStudio and .AndroidStudio1.2) and on my new .AndroidStudio1.2 folder there are no other.xml file.
than i copy other.xml file from C:\Users\my windows account name.AndroidStudio\config\options to C:\Users\my windows account name.AndroidStudio1.2\config\options
and that how i solve my problem.
I'm using UBUNTU and I got this same error. I restarted the set up using sudo and did a custom install. This solved my problem!
--More Specific--
re-installed using # sudo ./studio.sh
then I made sure to click "Custom Install"
then I made sure all packages were selected.
And I got this message Android virtual device Nexus_5_API_22_x86 was successfully created
I just run:
C:\Users[Username]\AppData\Local\Android\sdk\SDK Manager.exe
Install SDK Platform Android M Preview
And run Android Studio again.
It's working for me :D
When this error occured I first clicked retry for few times and waited for 2 minutes and clicked 'retry' then it installed without any error.(for 2 minutes I was searching to solve this problem online).
I was getting an "out of space" error, which left me scratching my head as I had plenty of disk space, until I realized that it ran out of space on /tmp, which on Arch Linux is mounted on a tmpfs with a size limit.

Android Studio Not Including SDK

I'm trying to setup Android Studio on a new install of Mac OS X Yosemite. I downloaded the Android Studio Beta v0.8.14 from here: https://developer.android.com/sdk/installing/studio.html and upon launching it complained about not having an SDK (although the download page indicates it should include the SDK). I tried searching after installing for the SDK and can't find it (a few other posts indicate /Applications/Android Studio.app/sdk but that location doesn't exist). Where is the SDK installed and what is required to set it up?
Go to the SDK Manager and click Edit... next to the field for the location of the SDK. Then an "SDK Setup" window should display. There you can download the SDK.
Edit: This answer is deprecated as Android Studio seems to bundle everything since a while already.
Old answer
It seems the android-studio-bundle version is no longer available in the download page (instead there are only android-studio-ide). When you start Android Studio, it won't let you create a new projet until you configure the SDK location.
That means you have to download the SDK separately here, extract it somewhere, and configure it on Configure->Project Defaults->Project Structure. After that, the SDK Manager icon will be enabled and you can download the tools you want.
I had the same problem on Windows. After I re-installed it a few times, I found that the SDK was installed but hidden in C:\Users\<user name>\AppData\Local\Android\sdk.
Information for Windows
For some reason, which I have no time to investigate, Android seems to provide, currently, the IDE and the SDK separately, while in the Dev Webpage says the opposite.
This is the "complete" (false!) tool I have just downloaded: android-studio-ide-171.4443003-windows.exe (SDK is missing here, note the "ide" in the file name).
And this is the real complete tool I had downloaded few months ago, from the same place...: android-studio-bundle-162.3871768-windows.exe
Note that this last one has the "bundle" in the file name.
Please, download the bundle (IDE+SDK) from here:
https://dl.google.com/dl/android/studio/install/2.3.1.0/android-studio-bundle-162.3871768-windows.exe?hl=ko
I want to suppose (¿?) that similar link you can find for Linux or macOS just Googling for it.
Hope this helps!
It worked like this for me
Downloaded the Android Studio
Install Android Studio
Open Android Studio after installation.
You will get a dialog box to import settings if you already have Intellij installed on your machine. Say "Do not Import". Otherwise continue to next step.
It will ask you in the dialog box to pre-configure such as theme, path etc.
Just click next next...and then Finish. You will see the SDK tool will start downloading.
After installation is finished. You can find it in this path: C:\Users\<user name>\AppData\Local\Android\sdk
If you have ever installed Android Studio before and then removed it, it won't reinstall the SDK automatically (speculation: some Windows setting somewhere).
The solution is starting Android Studio and then
File -> Manage IDE Settings -> Restore Default Settings
This will wipe any custom settings you don't have at this point and trigger the SDK install
What Pablo wrote is misleading.
This is the "complete" (false!) tool I have just downloaded:
android-studio-ide-171.4443003-windows.exe (SDK is missing here, note
the "ide" in the file name).
Yes, it is IDE only, but after you install this IDE and first time run it, SDK will be downloaded automatically. So there is no need to download some outdated bundles. Just use default "green button" on https://developer.android.com/studio/index.html
I'm using Ubuntu, and had previously installed Android Studio. It was using too much space, so I deleted it. Now when I downloaded it and started ./studio.sh, it found my previous installation configuration directory and asked to import from there. I did, and then this problem occurred.
I put the directory .Android Studio 3.3 in the trash and restarted ./studio.sh, and it imported the SDK automatically for me. That was good, because I couldn't find it where it was supposed to be according to the dialog box. The 3.3 above is from the version of Android Studio I was installing.
in my case, my country is forbidden from google, and my PC's time zone was set by my counrty.
after I change my timezone to another country my problem solved and android studio download SDK and nkd easily
Re-install studio. If ANDROID_HOME is set to custom location then it will install sdk there else it will install SDK in C:\Users<user name>\AppData\Local\Android\sdk
Note:this is a temporary fix
If you have Eclipse then you can use that SDK for emulation.
Just run the sdk manager and emulate a version of android. Then while you are asking for emulating something ie while running code it will show your emulator as online and you can even use it.
Hope this helps you.
All the Best...

Cannot create a new android application on eclipse

I am a beginner to android development,I have downloaded adt-bundle-windows-x86_64 with android 4.2 and started the eclipse version(Android developer tools) provided with it.But when I click finish after filling all the details in new android application dialog box,the finish button doesn't seem to respond at all.At the first click on finish button an application is created but no java files in it and the dialog box stays still.At least the android 4.2 library is not in the application.src is also empty.
I'm working with Windows 7 64bit and JDK 1.6 64bit.
Any idea on solving this?
http://developer.android.com/training/basics/firstapp/creating-project.html
http://developer.android.com/tools/help/adt.html
http://www.chhitizbuchasia.com/articles/chhitiz/2011/02/Setup%20Android%20SDK%20With%20Eclipse.html
http://developer.android.com/sdk/installing/installing-adt.html
Cannot create a new Android Project using Eclipse
install android sdk manager
step1
step2
step3
install the following sdk to perform the application
Download ADT plugin
http://developer.android.com/sdk/installing/installing-adt.html#Download
BASIC STEPS
http://blog.teamtreehouse.com/the-one-stop-android-sdk-installer-you-always-wanted
Best Jvm setting
Eclipse is not that much robust IDE.If nothing can solve your issue.try to restart Eclipse and your Computer.
and yes,before restarting just update the packages.
Go to SDK Manager, and install available updates for following packages.
Android SDK Tools
Android SDK Platform-tools
After updating,it will be look like this,
I just got mine past this bug; hopefully yours will fix too?
On the screens with menus to select from, where one item is greyed (selected?) as default:
Deliberately click the item, to ACTUALLY select it (it turns dark blue or something).
Mine apparently got caught up on the "Make activity" (or whatever) page, and until I went back and assumed that the default had failed to select it, I was unable to choose finish (even though it clicked, looked as though it was going to do something, and then didn't go).

Eclipse: won't let me use Android SDK, wrongly claims my ADT is out of date

I'm developing for Android with Eclipse, and all was working well until yesterday. I used Ninite to update all my stuff, including JREs and everything (pro tip: do not do that), and it restarted my computer without asking in the middle of editing my workspace.
This caused all kinds of filthy problems, but now it all works, except for Android. I've updated Android SDK and the eclipse ADT, then when I try to tell Eclipse the SDK location, it gives this error:
This Android SDK requires Android Developer Toolkit version 14.0.0 or
above. Current version is 12.0.0.v201106281929-138431. Please update
ADT to the latest version.
Now, this is an outright lie. My ADT is version 14.0.something. I've tried Help>Check for updates, it says there are no updates. I've tried Help>Install new software...>Available Software Sites and removing the ADT repo, then reinstalling ADT, and it says it failed because I already have version 14.0.whatever.
How do I convince eclipse that my ADT is up to date??
I found the answer to the problem. (I'm using Helios, but it should work anyway)
Goto folder /Program Files(x86)/Eclipse/Plugins/ and make sure previous older versions of com.android.ide.eclipse.adt.package_##... are deleted (sometimes update fails to delete because of UAC). Keep the current desired version and complete the following.
Run Eclipse as administrator or disable UAC temporarily. (windows 7)
Go to Help → Install New Software.
On Work with: type https://dl-ssl.google.com/android/eclipse/ and press ENTER.
Wait for Eclipse to fetch the repository. An item named Developer tools will appear in the list.
Mark it for install, press Next and follow the steps to install the ADT tools.
When finished, it will ask to restart Eclipse. Make sure you do this.
When Eclipse restarts, all your Android SDK packages should show up again.
Dont forget to resume UAC if you need it.
An option is to manually download the ADT plugin (ADT archive) required. The page is, http://developer.android.com/sdk/eclipse-adt.html. The page reveals ADT 18 is available at http://dl.google.com/android/ADT-18.0.0.zip. The link is closer to the bottom page. I needed 17 although 18 was the latest, so I modified the download URL, changing 18 to 17.
Select Help → Install New Software → Add → Choose Archive and select the location of the downloaded ADT archieve file, Choose OK.
Select the components required and proceed as required. You may get a message that the software is already installed, proceed with the installation.
Hope this helps.
I had the same problem. My ADT in the eclipse was 8.x version. But my app required version 12 or more. So, I decided to upgrade both the Android SDK and ADT to the latest (at this time latest ADT is 17). I was able to upgrade the SDK but not the ADT. It always complained I got the versions already but I only had 8.x. The new SDK that I just upgraded would function only with ADT 14 and above. So, I had successfully broken my android development!!
The reason why I wasn't able to upgrade my ADT to the latest was because I was using Eclipse 3.5. The newer ADT versions require 3.6 or above. This small but key bit of information was really at the bottom of the error generated by Eclipse which required scrolling down (since only the top few lines of error were displayed). You typically wouldn't scroll down since these top few lines were followed by whitespace lines :). I did not scroll and I guess I wasted about a day trying to rectify this problem. But eventually I saw those 2 up/down arrows at the right of the dialog box and I scrolled down. There it clearly mentioned ADT 17 requires Eclipse runtime 3.6 and over.
So my solution was to find a suitable ADT that would work with Eclipse 3.5. Yes, tomorrow when I am in the mood, I shall upgrade to Eclipse 3.6 or 3.7 and the boat load of plugins I have :)
I've just upgraded my Android SDK version, and had exactly the same issue.
The 'Check For updates' Eclipse command failed because, for some reasons, Android Traceview failed to update.
My solution was to :
* Open Eclipse → Help → About Eclipse .
* Click Installation Details.
* Here select all the android related lines, and update them one by one, restarting eclipse each time.
And finally it worked ( even with Helios ) !
Best option is go to open eclipse ID
Then go to Help → About Eclipse >>
u will find the Installation Details button click on that
And now u can see the all anriod extension installed.
Select all or select one by one and just click the update button.
you will get the latest version from the net.
Hope these will help you all.
In Eclipse:
Help → Check for Updates.
Your ADT and SDK is not up-to-date yet and Eclipse is complaining about the right stuff...
Open Android SDK Manager from toolbar and update your SDK from there. It doesn't help if you are checking Eclipse updates. Because through Eclipse you cannot check SDK updates for Android.
Button looks like this :
I'm hearing a common issue is that newer Android ADK versions require newer eclipse versions. Colleagues who hit this say they installed Indigo in place of older Helios versions and were able to resolve the issue this way. I have not yet done the same myself.
To anyone else with this problem, my solution was just to delete the Eclipse folder, and download a new copy from scratch. I had to then re-download all plugins including adt, which worked this time round.

Categories

Resources