I recently updated to Android Studio 2.3, and now when I try to run the application, the emulator does not come online. It times out after 300 seconds.
Additionally,
Seems like Android Studio (using version 3.5.1) gets into a weird state after a while. This worked for me.
File -> Invalidate Caches / Restart -> Invalidate and Restart
After trying all these solutions without success the one that fixed my problem was simply changing the Graphics configuration for the virtual device from Auto to Software (tried hardware first without success)
Once again, please wait for a while, sometimes you missed that it actually worked but you are feeling really stressed and could not wait(I was).
Not sure why I fixed the same issue that happened on my Macbook, however, choose Nexus 5X API R would work somehow. OR below
Wipe Data: Tools->Open AVD Manager and click ▼ the emu "Wipe Data"
Cold Boots Now: Tools->Open AVD Manager and click ▼ the emu "Cold Boots Now"
Uninstall & Reinstall Android Emulator from SDK: Tools->Open SDK Manager->Android SDK(left-side menu)->SDK tools(middle in the main screen), then click "Android Emulator" and APPLY, then again click "Android Emulator" apply to reinstall, so finish
Following worked for me on Android Studio 3.x.
Step 1: Open AVD Manager.
Step 2: Right click and Wipe data for the virtual device you're testing on.
I was having the same problem as you, android studio said I had Emulator 25.3.1 already installed
I deleted the Emulator folder (it's inside the SDK folder)
And then reinstalled Emulator 25.3.1 Sdk manager--> SDKtools --> instal the emulator 25.3.1
This time it worked :)
The problem is that there is no link between ide and the emulator.
In our case - we lowered version of android for the app, that frustrated ide in emulator linking.
If we install Android 25 and bind project to it, and AVD Device on Android 25 as well - it links and apllies changes on the fly. If we downgrade to Android 14 and device on android 14 - it doesn't.
Used Android Studio 2.3.
To play with versions you can set in Gradle Scripts - build.gradle (Module: app):
android {
compileSdkVersion 25
defaultConfig {
minSdkVersion 15
targetSdkVersion 15
}
}
As a result app won't run on an Android 25 device with a message:
Installation failed with message Failed to finalize session : -26: Package ru.asv.test new target SDK 15 doesn't support runtime permissions but the old target SDK 25 does.. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!