How to troubleshoot startup of Android emulator from inside Eclipse? - android

I have defined an AVD using the Android SDK AVD Manager application. When I press the "start" button in AVD Manager, it starts correctly.
In Eclipse, I have the "andmore" android tool set installed. It has a list of available devices that shows the AVD I defined, so clearly it is checking the right place to find them. The links from the Eclipse menus to open the SDK and AVD manager applications work, so the paths are clearly set up correctly.
Yet, when the AVD is running, Eclipse doesn't realise it: it states it is "offline" and refuses to attempt to install any applications on it. And if I stop it and try to start it via the Eclipse UI, it says that it is starting, then immediately stops with the error message "The Android emulator process has unexpectedly stopped running. The instance mm800 is now stopped."
I cannot find any information in the Eclipse error log about why the emulator may have stopped. Nothing appears in the console window, either. Where can I find information about what is going wrong? How can I debug this problem?
For reference:
Eclipse neon (4.6.0)
Andmore 0.5.0
Android SDK Tools 25.1.7
Android SDK Platform tools 24.0.2
HAXM 6.0.3
The AVD I'm trying to use is using the Android 6.0 Google APIs x86 image.

Did you lately upgrade your eclipse from let's say Indigo to Neon. I had this error happen to me when I did the upgrade. I copied the old Indigo workspace to a new location and then opened it with Neon (didn't create a fresh workspace and import). My AVD did appear offline in device manager view. But when I opened the "Devices" view it appeared okay.
If you right click your project and go to "Run as" you might find two "Android Application" entries. One with a green icon and another without. Try running it using the not green icon. This worked with me.
Or otherwise try creating a fresh workspace and importing your project into it.
Hope this helps
Edit: I fiddled with it more and created a new workspace. Looks like it does the same as mentioned before. Looks like a problem with the ADT plugin. But still I can run my projects using the "run as android application"

Related

Android Studio AVD Manager button is disabled

I'm very new to Android development and have never used Android Studio before. I set it up, got my app working on my phone and left it alone for a few weeks. Upon returning, I could not find the Android Studio executable on my computer, so I reinstalled it and restarted on the same project.
Not sure if this has to do with the AVD Manager button being grayed out. Things I have tried:
Making sure my SDK path is correct
Running Android Studio as administrator
Launching the AVD Manager executable from windows. I can create a virtual device but doesn't affect disabled AVD Manager button when restarting Android Studio.
Installing Intel X86 Atom System Image and Google APIs in SDK Manager, under API 24.Everything under API 25 is installed.
Any help is appreciated. Thank you!
This generally happens when Android Studio is not able identify the android sdk installation in the machine. This could happen if Android Studio is launched in non-Administrator mode.
Just close and relaunch Android Studio in administrator mode. You will see a saying "android framework is identified" Click on the configure link on that notification. The AndroidStudio will start configuring the android sdk. After some time the buttons would be visible and enabled.
If you tried running the Android Studio in administrator mode and it still do not work for you try the following way.
Delete the .idea folder in the project
Re open the project from going to File->Open Recent->
Then you will be asked to convert the project
Click convert
For anyone seeing this problem following the React Native tutorial make sure to click the "Configure" button in the Event Log next to the log text that reads "Frameworks detected: Android framework is detected in the project"
This action seems to be what configures the project to be an Android project.
I'v solved this issue by updating gradle.
It is simple
The only thing that worked for me was that I clicked in Androidstudio in the top right on SDK Managar.
And there under android sdk it was so that there was no path entered. and it was also so that NO Check box was checked below.
So I had to first click in the top right on Edit thereby was written to me the path pure.
After that I had to select a chack box below it no matter whiche and sometimes it must then just install something. When it has finished installing click OK. It may be that you then have to close and open android studio again.
I was having this issue on a new machine running MacOS High Sierra.
After installing Android Studio and the most recent SDK/
SDK Tools, I was unable to create any AVD from Android Studio (button greyed out, no option under Tools) or run the AVD Manager any other way.
I tried the same things the OP had done, then noticed I was getting the following error: Gradle sync failed: Failed to find Build Tools revision 26.0.2
From the Event Log I followed a link to download the Build tools and now it works!
If you are working on Flutter, Follow the steps:
Open Settings in Android Studio (CTRLALTS)
Search Flutter
Check may path of Flutter SDK is not available.
Set the path and press OK.
Done! Thank you
I tried the answers here, but the only solution for me was to restart my machine and it fixed itself. It happened after upgrading AS (from 4.0.2 to 4.2.2)
in android studio or intellij program:
goto tools > android > SDK manager
click on Edit (android SDK location)
click next and next
close dialog
its ok.

Can't set up an avd to use for an emulator in Android Studio

So just now I decided to switch over to Android Studio from Eclipse, everything seems to be fine except that I can't even find the menu to add a new virtual device.
On the Android dev website it says it should be in Tools>Android>AVD Manager or to execute "android avd" from the tools directory, but I don't have a tools directory.
I installed it with pretty much all the default settings so i don't know how it's not there.
Fixed itself sort of. I tried running a project and android studio had a message come up there that allowed me to install the part that was missing, I don't know why I didn't have it at the beginning though.

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

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

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/Android SDK won't let me select a 'Build SDK' option when starting a new activity

I am attempting to use the android plugin for eclipse (Indigo), and I've gotten it to work once. Unfortunately the machine I am using has a 'deep freeze' program on it, and so I've had to install the SDK several times in order to use it. I have permision from the system administrator to install the SDK permanently, but I cannot seem to get it installed correctly. My problem is as follows:
I follow the instalation instructions found on http://developer.android.com/sdk/installing/index.html, have a few problems making Windows recognize the fact that the JDK is already installed (which I work through), and then complete the installation. I attempt to create a new Android project and in step 1 of the project creation the drop down bar labelled 'Build SDK' is completely blank, and the 'next', 'back', and 'finish' buttons are all dark and unclickable.
I'm not quite sure what I've done differently from installation to installation (of the SDK). Any help or suggestions would be apreciated.

Categories

Resources