Tag Archives: executing

[Solved] Android Studio Run Error: Error while executing: am start -n

Error details, problem causes and Solutions

Error reporting details

08/19 09:54:18: Launching app
$ adb install-multiple -r -t D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_4.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_9.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_3.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_8.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_6.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_5.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\dep\dependencies.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_7.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_2.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_1.apk D:\work\self\CallAutoRecord\app\build\intermediates\resources\instant-run\debug\resources-debug.apk D:\work\self\CallAutoRecord\app\build\intermediates\split-apk\debug\slices\slice_0.apk D:\work\self\CallAutoRecord\app\build\intermediates\instant-run-apk\debug\app-debug.apk 
Split APKs installed in 10 s 564 ms
$ adb shell am start -n "com.guoqi.callautorecord/com.guoqi.callautorecord.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Error while executing: am start -n "com.guoqi.callautorecord/com.guoqi.callautorecord.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.guoqi.callautorecord/.MainActivity }
Error type 3
Error: Activity class {com.guoqi.callautorecord/com.guoqi.callautorecord.MainActivity} does not exist.

Error while Launching activity

Cause of problem

The mobile phone system bug did not uninstall the app completely, resulting in installation failure and failure to run.

Solution

First go to the SDK \ platform tools path and find the ADB command
. Then, in the current directory, open the command line window and enter ADB devices .

Confirm that the mobile phone is connected, then use ADB to uninstall, enter the command, ADB uninstall com.guoqi.callautorecord ( com.guoqi.callautorecord is my own package name, and I want to change it to my own)
is installed successfully, as shown in the figure below