17

i am getting the error while running my app in android emulator

com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_DEXOPT

Ashutosh Dash
  • 602
  • 2
  • 7
  • 15
  • 1
    You might search a bit. There are some common reasons for that error, like: https://stackoverflow.com/questions/5153515/how-do-i-solve-the-install-failed-dexopt-error – Retired Ninja Apr 05 '19 at 05:55

3 Answers3

20

You probably need to allocate more internal memory to your emulator. This can be done by:

  1. Opening Android Virtual Device Manager...

  2. Edit the device you're having a problem with.

enter image description here 3. Show Advanced Settings (see yellow arrows below)

enter image description here

  1. Increase the internal storage to 5120MB

enter image description here

  1. Restart the emulator (cold boot)
CacheMeOutside
  • 699
  • 7
  • 24
8

By cleaning cache and making more space in android emulator helped me to resolve it.

Ashutosh Dash
  • 602
  • 2
  • 7
  • 15
2

Uninstall the existing app with the same package name(google service file with the same package) from the phone. Hope this helps someone.

Srijwal R
  • 552
  • 9
  • 16