我似乎无法启动我的应用程序。它给我这样的错误:“运行第二个 Activity 时出错:必须导出 Activity 或包含 intent-filter”。
我的 list 有什么问题吗?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="sg.edu.rp.g913.mymakeuppouch">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".secondActivity">
</activity>
</application>
</manifest>
最佳答案
放android:exported="true"在<activity>标签
<activity android:name=".secondActivity"
android:exported="true">
关于android - 运行第二个 Activity 时出错 : The activity must be exported or contain an intent-filter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40464824/