Error type 3 Error: Activity class {...} does not exist.


1.运行项目时,出现

Error while executing: am start -n "com.example.yang.myapplication/com.example.yang.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.yang.myapplication/.MainActivity }
Error type 3
Error: Activity class {com.example.yang.myapplication/com.example.yang.myapplication.MainActivity} does not exist.

Error while Launching activity


Error type 3 Error: Activity class {...} does not exist._第1张图片


解决方案:

1.保证 包名正确 文件存在  

     ①  build.gradle(Module:xx)   ② AndroidMainfest.xml 

2.  build --> clean project 试试 能不能成功如果不行 请看第三步

3. Run--> Edit Configurations...  查看Deploy:   如果是Nothing 请选择 Default APK

Error type 3 Error: Activity class {...} does not exist._第2张图片

Error type 3 Error: Activity class {...} does not exist._第3张图片

效果:

Error type 3 Error: Activity class {...} does not exist._第4张图片


你可能感兴趣的:(android)