更新时间:2023-10-20 20:01:52
我发现了问题!我在清单中使用不同的属性声明了 2 次活动,例如:
I found the problem! I had declared the activity 2 times in the manifest with different properties, like:
<activity android:name=".myclass"></activity>
和
<activity android:name=".myclass" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
从清单中删除不需要的,它就会起作用.
Remove the unwanted one from the manifest and it will work.