'android studio: the emulator cannot be launched more than once
So, I have Android studio installed, and I cannot use the emulator more than once.
So once installed, the emulator works very well at the first use. when I close it, then open it again, it does not work anymore. The message reads: Installation did not succeed. The application could not be installed. Installation failed due to: 'UNKNOWN'.
I have to delete it, then install it again, for it to work again...just once.
what can be my problem please?
Thanks in advance.
Solution 1:[1]
I have occured the same situation as yours, and I fixed it.
My OS is Windows 10, my experience may help.
First, find the environment variable %ANDROID_SDK_HOME%, as for me, the %ANDROID_SDK_HOME% is E:\Android\Sdk, and then find your emulator's configuration file in the path,
%ANDROID_SDK_HOME%.android\avd\{your_emulator_name}.avd
For me, it is E:\Android\Sdk.android\avd\Pixel_testx64.avd. In this path, you will find a file named emu-launch-params.txt. In this file, you can see that,
-studio-params
C:\Users\lenovo\temp\emu.tmp
It is a path which Win 10 use it as default path to store temp file, and I have changed the registry, so my temp file path should be
-studio-params
E:\Users\lenovo\temp\emu.tmp
I just change it, and it works.
But every time I open the emulator, it will be the origin, so I must change this file every time I use the emulator.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | C JT |