Error running : The activity must be exported or contain an intent-filter
错误
Error running : The activity must be exported or contain an intent-filter
见下图右下角红色错误框
解决
在manifest.xml中将所需运行的Activity配置上设置android:exported=“true”
见下图红框
修改了LAUNCHER Activity的设置,在新的LAUNCHER Activity文件上右键–Run ‘XXXActivity’
原因
在Activity中该属性用来标示:当前Activity是否可以被另一个Application的组件启动:true允许被启动;false不允许被启动。
而android:exported="true"表示要运行的Activity可以被其他应用打开。
原创不易
转载请标明出处
如果对你有所帮助 别忘啦点赞支持哈