Error: Default Activity Not Found

I upgraded IntelliJ Idea 12.0.4 to 12.10.

Now all the modules in my Android project give the error:

Error: Default Activity Not Found

I reverted to 12.0.4 and it works.

Any ideas ?? I think it might be related to some plugins not being installed cause the only other thing could have been a local config but I deleted the configuration folder to confirm and that didn't change anything.


如果在升级IntelliJ IDEA或Android Studio版本后或在生成新的APK之后发现错误,则可能需要刷新IDE的缓存。

File -> Invalidate Caches / Restart...

I can't comment on why the upgrade of IntelliJ might cause this problem because I don't use it.

However, that error: "Default Activity Not Found" seems to be telling you that you don't have an activity declared in AndroidManifest.xml that is marked as the main activity, to be launched when the application starts.

You should have at least one activity that looks something like this:

<activity
        android:name="com.your.package.name.YourActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

If you don't have at least one activity with an intent filter like that, you would most likely see the error message you have included here.

You should add that intent filter to the Activity that you wish to open when you start the application, and that should fix your problem.


You app have launch activity default?

possibly this could be your mistake

Step 1 : Select Edit Configurations

Step 2 : watch this warning: Default Activity not found 在这里输入图像描述

Step 3 : select a default activity

在这里输入图像描述

Step 3 : Save your changes and finish

Good Luck

在这里输入图像描述

链接地址: http://www.djcxy.com/p/72782.html

上一篇: 在Intellij想法下,Lombok注释不能编译

下一篇: 错误:找不到默认活动