How can I fix this error. MainActivity class already in my project. Here's a screenshot of the error
I tried this link, but it didn't work for me
How can I fix this error. MainActivity class already in my project. Here's a screenshot of the error
I tried this link, but it didn't work for me
I got this error as well. For me it helped to set minifyEnabled
to false
for my debug version. After Clean Build
it launched again.
It may be silly but make sure you have enough storage on your phone. This was the problem for me
I have faced this problem when I tried to build & run on real device Android 8.1, API 27
. Saw this and this answers, but they didn't helped.
Solution: Then, tried to run on emulator Android 7.1 API 25
, everything went fine. Hope this will help others.
This suddenly happened to me today. After trying several other potential solutions, nothing worked. I then looked in the app configuration and noticed that the Installable Options: Deploy method had been set to "APK from app bundle" instead of "Default APK". Setting it back to "Default APK" fixed the issue for me. I hope this helps someone :-)
just make sure your emulator is RUNNING, and that you're LOGGED INTO IT.
I haven't the foggiest idea why this error message is returned for "unable to deploy an app while your device is booting or locked," but literally every time I've been hit with this error:
If the device hasn't made it to its home screen, then if I kill the device and relaunch it from the device manager, then run a build, it's resolved, or
If it's sitting on the lock screen, simply unlocking it then rerunning the build resolves matters.
I noticed it start after I set up biometrics on the emulator. I'm reasonably convinced that "Error 3" is "we couldn't manage to get the app onto the device or emulator, and since we dunno why,we'll say we couldn't launch the main activity" (which, to be fair, it COULDN'T).