I'm learning Android studio and my Android studio Emulator was working fine until a recent windows Update happened. When I tried to load the emulator it's no longer responding.
In the Run log I get
Error while Launching activity
it's not specifying what error it caused.
Things I did to troubleshoot
I tried to increase and decrease the RAM.
Tried to remove the .gradle and .idea folder and synced the files again.
But no luck - Any help is appreciated.
Try to go in the Emulator setup and reinstall the emulator device after removing it.
Maybe It because of your graphic card latest update . Install your pervious version of your graphic card. It helped me
Since yesterday, my android studio emulators don't start. It was just after i updated Android Studio Library, i don't know if it is just a coïncidence.
What happens when i press start is:
The emulator command is executed
I see emulator.exe process in windows task manager, but no window is opened
Before that, the emulators started just fine, i had no problems, so it shouldn't be hardware issues.
I tried to launch it from the command line, to see if there were errors, but there's nothing. I also checked android studio's logs but still nothing... I also reinstalled completely android studio with no effects. I also tried to let it run for awhile but nothing appears.
Does anyone have a clue about what could cause this ?
EDIT :
It was a known issue (GPU related) of the SDK Tools 25.1.1 , it has been updated about 5 days later and now it works perfectly.
I had exactly the same issue.
Removing C:Windows\System32\Wbem from system PATH variable helps me:
https://stackoverflow.com/a/36650430/1901621
I m facing a problem whenever i m running my application . it says Failed to start monitor thread and : adb server didnt ack.
I tried every possible way but it served no purpose.
Here are the following steps i did to solve it:
I opened task manager and killed adb and then restarted ADT.
in the command prompt i killed the running adb server then restarted it.
in the DDMS i tried to reset the adb but it says Plugins are not configured properly.
I have properly set my path even though these problems are popping up.
I think there is not any device issue as even my emulator failed to start.
sometime on restarting the adb server error comes as `daemon still not running"
kindly help me out...
What version of ADT are you using?
If you've recently updated the Android SDK, but haven't removed and reinstalled (from scratch) Eclipse, then that' likely the source of the problem. When Google released the newest version of the SDK, they seemed to have messed up ADT updating.
Removed ADT from your computer (you can leave the SDK Manager installed) and reinstall Eclipse from http://eclipse.org/
Once you've reinstalled Eclipse, follow these instructions to get your ADT plugin working: http://developer.android.com/sdk/installing/installing-adt.html
I upgraded to the latest android studio and as ever it breaks what was working fine before.
If I plug in my android device I can see debug in the debug monitor, it gets detected and i can select it as a device to deploy to, then I get
Waiting for device.
Target device: xxxxxxxxxxxx
and nothing else happens.. VERY frustrating. Anyone any ideas on how to resolve?
Here is the resolution:
The problem is the way i installed the newer version of Android Studio. Do not install it over your previous installation directory. Create a new directory and move over your SDK into it. This is how I resolved it.
The only error I was eventually able to get from Android Studio was if i tried to run a test I'd see
NoSuchMethodError: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;
there has been some other posts referring to this issue. Just make sure you do a clean install and don't crap over your older version.
This issue on the AOSP bug tracker tells you what is going on. A quick fix is getting rid of builder-model-0.11.0.jar from plugins/android/lib in your Android Studio folder. A patch has already been submitted and this probably won't happen again with the next update.
I am having a problem in running my app in Emulator. There are no errors or warnings in the code, its running perfect in device, but when it comes to emulator, it always crashes and the error message would be like this
[2012-01-16 16:13:55 - MyApp] Failed to install MyApp.apk on device 'emulator-5554!
[2012-01-16 16:13:55 - MyApp] (null)
[2012-01-16 16:13:55 - MyApp] Launch canceled!
I have tried the following things:
Run configurations > Target > Wipe user data > Run
Uninstalling the app and run it again
Restarting the emulator
adb kill-server && adb start-server
Creating a new Emulator and running the app in it
Restarting ADB
Restarting Eclipse
Starting the Eclipse after the emulator is launched completely
Increasing the ADB connection time-out to 1000
Restarting the System
Deleted the emulators and created new emulators and run in it after they are completely loaded
I don't know what else should I do. Sometimes if I run in a new Emulator the app runs for the first time and if I run it again after sometime, its the same crash report. I am not able to understand what is the problem.
Can anyone please suggest me what should I do now and where is the problem?
The Emulator used to work well before. This problem started a few days back.
Any help will be appreciated. Thanks All.
Have you defined all of your Activities correctly and completely in AndroidManifest.xml?
Can you paste the definition of your AndroidManifest.xml here?
Try that.
More possibilities:
Real refresh of AVD. It is funny, but Eclipse remembers your emulator. And if you turn it off and on it will be the same old good (or bad) one. You could reinstall all Eclipse for a real refresh. Or use a shorter, but tricky way. Change the max VM app heap size of the emulator. (Android SDK and AVD manager - Virtual device - Edit) Create it. Now you have a brand new emulator. Funny, isn't it? Now you can change the heap size back, if you wish.
Really, I think, you can maybe change any emulator parameter for the effect. Only I stumbled upon it by heap size and stuck to do it this way.
Try to repair the path.
Set the path environment variable with the path of "platform-tools" and "tools" found in the "sdk-home".
On windows(vista):- 1.Go to "Control Panel\System". 2.Select "Advanced System Settings". 3.Select the "Environment variable". 4.Set the path environment variable under the system variable with values "SDKHOME\platform-tools;SDKHOME\tools". Where "SDKHOME" is the home folder of Android sdk.
Check,if APK version of the application sits with that of the
emulator.
Try to set a longer waiting time for launch.
Increase AVD heap and SD card
Maybe, it would be good to try to recall all the changes that were done before the problem appeared?
Oh! One more: Don't you have by accident simultaneously launched emulator and connected device? If you have the same application (ssame name) on both, they could conflict in a similar way! They simply won't let each other to be launched
If nothing helps:
I was already so tired of Eclipse errors, that I have installed the IntelliJ Idea IDE, too. Now, if for the same project applications behave idself differently on both IDES, the problem is in IDE setting or emulator. If the problem is the same on both, I look for a bug in my application or the external device. Once I had a problem in OS - had to restart Linux. But in your case it is the most probable, that the problem is in AVD. I am afraid, the only variant you haven't try yet is to reinstall Eclipse. Uninstall, remove everything from the application except code, layouts and Manifest, and install Eclipse anew. Or make other Eclipse installation, with its own workshop. You can try the last version. But if the problem is in some setting, you can set it again...
Sorry, I have put here all methods I used or found.
here you can find a similar problem and the proposed accepted solution:
Honeycomb preview - can not install my app on emulator under Eclipse
I hope this helps.
This could be due to Antivirus/Firewall software installed on your PC. Have you tried to disable it?
You should also ensure that versions of Eclipse, ADT and Android SDK are up-to-date and compatible. Have you tried to contact update sites in Eclipse and in Android SDK manager? By the way, what versions of the that software do you use?
Let's go step by step.....
1º- You should try to start the emulator without the application installed.
2º- Once it is running correctly, try to install another .apk(like for example one default one....)
3º- Now, try to run the .apk. If the problem continues, try to delete the current VM and install another new one.
Can you see Emulator in "adb devices"? If yes, can you install any .apk?
If not - you have propablly something wrong with sdk
As some people have answered already partly. Make sure of a couple things which are very important specially because of the latest Android tools releases which requires.
The latest eclipse version. Yes, very very important:
http://www.eclipse.org/downloads/packages/eclipse-classic-371/indigosr1
Make sure you update the Android ADT plugin for eclipse:
http://developer.android.com/sdk/eclipse-adt.html#installing
I've encountered similar issue and that was what has helped. Restart your computer too possible?...
Use command prompt to start emulator
emulator.exe -avd google2.2 -scale 0.7 -dns-server 8.8.8.8
it may help you.
try cleaning your project or deleting the .APK file in the bin directory of your project.