我ActivityNotFoundException在以下代码中得到一个:
Main.java
Intent intent = new Intent();
intent.setAction("com.test.app.TEST");
startActivity(intent); // ActivityNotFoundException
Run Code Online (Sandbox Code Playgroud)
的Manifest.xml
<activity android:name=".MainActivity" android:theme="@android:style/Theme.Dialog">
<intent-filter>
<action android:name="com.test.app.TEST" />
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud) test.class类型是对的吗?如何?我该怎么办?
<Preference
android:key="test"
android:title="test"
android:summary="test">
<intent android:action="test.class" > <=== **ERROR/AndroidRuntime(2384): android.content.ActivityNotFoundException: No Activity found to handle Intent**
</intent>
</Preference>
Run Code Online (Sandbox Code Playgroud)