1

I'm trying to launch a project in Android Studio using the Android Virtual Device Manager. At first the Android Emulator pops up with a Google icon and a loading bar, but it never actually finishes loading. Emulator:

I also tried running the program without using the Device Manager and just clicking the 'Run' button. A, in which case I get this: enter image description here "Instant run requires that the platform corresponding to your target device (Android P Preview) is installed." And if I click on "Install and continue" it says: "All packages are not available for download! The following packages are not available: - Package id Platforms;android-P"

These are all the versions I have installed: enter image description here

Instant run requires that the platform corresponding to your target device (Android P Preview) is installed.As you can see, the Android P Preview is actually installed. Although it says on the right it's "Partially installed" there doesn't seem to be any update option. I have no idea why this won't work.

Please help.

Nikunj
  • 3,937
  • 19
  • 33
Sebastjan
  • 71
  • 1
  • 2
  • 8
  • @Sebastijan I have answered a similar question here [link](https://stackoverflow.com/questions/51050208/android-studio-virtual-device-stuck-on-g-screen/51055375#51055375) the same steps might help you. Also Instant run is not compulsory to run an app, an app can run without it just click proceed without an instant run. Regards, Sankalp – Sankalp Jul 04 '18 at 06:33
  • How do I lower the specs of the Emulator? – Sebastjan Jul 05 '18 at 08:16
  • Use a lower resolution emulated phone for example Nexus One. If you have 8GB or above that should run very smoothly, the lower the resolution of a device the better will be the performance. Other than that you can increase the VM Heap size from the advanced setting of the emulator. (But I do not recommend that it is by default set to an optimized value). The best option would be to use a real device (By enabling USB Debugging). In that way, the performance of the system is not compromised. Regards, Sankalp – Sankalp Jul 05 '18 at 08:28

1 Answers1

0

This seems like a memory issue with your AVD. Newer API emulator images may require at least 1 or 2GB of RAM in the AVD's settings, and a larger VM heap size.

  • Setting RAM too low will cause the emulator to either fail to start, or start but never end booting. Use at least 1024 or 2048 MB for API26 images.
  • Setting RAM to a value higher than your system’s capacity will fail to start the emulator
  • Emulator’s first boot seems to require more RAM. If you create an emulator with 512 MB for the first time, it might never end booting and hang. If you create it with 2048 MB, start it up, then close it, you may be able to run it with as little as 512 MB from now on, to a certain extent. All RAM values here refer to the AVD’s assigned RAM

Taken from this blog post. Also check out there if you need HAXM or Hypervisor for hardware acceleration.

andreszs
  • 2,896
  • 3
  • 26
  • 34