-->

Android App not loading in Emulator after Android

2020-08-17 08:21发布

问题:

I have just uploaded my Android Studio version to 2.3, and I am now having problems testing my app in my emulator. It is a Nexus 5X emulator with Android 7.0 Nougat loaded on it (API 24), with an ABI: armeabi-v7a (I have an AMD processor, so to the best of my knowledge I can only use this). Before, it was a bit slow and would sometimes come up with a 'Not Responding' error, but clicking 'Wait' would always do the trick.

After the Android Studio update, when I press 'Run', it opens up & boots the emulator. However, once booted, it gets stuck on the "Launching App - Installing APKs" process. It probably shows that it is doing this for about 2 minutes, before stopping. It then shows "Launching Instant Run Service" for a few seconds. The green 'run' arrow then becomes active again, as if there is no emulator open. The emulator is open, but there is no app. If I click the green 'run' arrow with the emulator already open, it does a gradle build sync & then doesn't even attempt to launch the app/install APKs - it only says "Launching Instant Run Service" for a few seconds, even though nothing happens.

I have tried removing the emulator & recreating it, and I have also tried fiddling with some of the parameters as suggested in other posts which concern similar (but not identical) issues to this. The first time I tried to run the app on the emulator after the update, I had many messages pop up in the event log, saying Android Studio Can't Bind to Local 86xx for debugger, whilst the Android Device Monitor was opened. Ever since then, with the ADM closed, I have had the problem described above, with no error messages showing in the error log.

Any help with this issue would be very much appreciated - please note it concerns the very latest version of Android Studio which I have only just had a popup requesting that I install. Build Tools Version in build.gradle has also been updated from 24.0.2 to 25.0.0.

回答1:

If you haven't already done it:

Open Tools -> Android -> SDK Manager
Select tab SDK Tools, flag Android Emulator (version 27.0.5 at the moment) and Apply

This solution worked for me, hope this can help



回答2:

I tried all of the aforementioned and it didn't help. What helped was disabling Instant Run in Settings -> Build, Execution, Deployment -> Instant Run.

Relevant issue in AOSP bugtracker: https://code.google.com/p/android/issues/detail?id=235879



回答3:

Updating the Java SDK solved the problem for me.



回答4:

you need to download the Android Emulator for Android Version 2.3 or make sure when you updated your AS from 2.2 to 2.3 all these components got updated and installed. I had the same problem and i just downloaded the Android emulator and it worked fine for me.



回答5:

had the same problem, after two days of trying to solve this, i decided to uninstall android studio, and then install the new virsion 2.3 all over again, now Emulator working just fine! *not much of programming, but it did the job!



回答6:

Don't worry about updating anything. For some reason upgrading to 2.3 makes the default setting for running your app set to "androidDependencies" which does nothing except give you strange errors. Just go to Run -> Edit Configurations and in the window that pops up try to delete with the minus symbol the selection on the left pane with the task called android dependencies. Then click on "app" under the "Android App" expandable arrow at the top. (see the pic) edit configuration window



回答7:

I recently download Android Studio 2.3 and installed default components and some Android OS for emulator. When I use an emulator (version 26.0.0) I have problem with its sound and image (display is very poor).

I'm using Ubuntu 16.04.2, Kernel 4.8 and KVM is setup. It's an example of my problem:



回答8:

I think you've not enabled the developer settings in your emulator. Sometimes after update the emulator is reset and all the settings are lost. Enabling it, should solve the problem.