错误类型3错误:Activity类{}不存在错误、不存在、类型、Activity

2023-09-14 23:02:25 作者:意中人

我有一个INTELIJ(V12)Android的成功导入到AndroidStudio(V0.4.0)项目。它完美,如果我不改变任何东西的清单。当我想改变发射活动并运行,它与下面的错误输出:

I have an INTELIJ(v12) android project successfully imported to AndroidStudio(v0.4.0). It works perfectly if I don't change anything in manifest. When I want to change the launcher activity and run, it outputs with the following error:

Launching application: com.trackingeng/LandingActivity.
DEVICE SHELL COMMAND: am start -D -n "com.trackingeng/LandingActivity"  
    -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN  
    cat=[android.intent.category.LAUNCHER] cmp=com.trackingeng/LandingActivity }
Error type 3
Error: Activity class {com.trackingeng/LandingActivity} does not exist.

当我点击同步工程与摇篮文件它输出:

Project Sync
The project 'TrackingEng' is not a Gradle-based project

任何人都面临着这个问题?任何想法?

Anyone has faced this problem? Any ideas?

运行设置:

Run settings:

推荐答案

我重构后面临着类似的问题。 这是我做过什么来解决这个问题:

I faced a similar problem after refactoring. This is what i did to resolve this issue:

清理项目 删除了构建目录 的重新开始Android的工作室 重建项目 运行 Cleaned the Project Deleted the Build directory Restarted Android Studio Rebuild the Project Run

和一切正常! 我认为关键是要重新启动IDE。

And everything worked fine! I think the key is to restart your IDE.

希望这有助于你或其他人!

Hope this helps you or anyone else!