[英]Manifest merger failed : android:exported needs to be explicitly specified for <receiver>
[英]Manifest merger failed : android:exported needs to be explicitly specified for <activity>
我的清单文件有问题,错误消息:
清单合并失败:android:需要为 明确指定导出。 面向 Android 12 及更高版本的应用需要为
android: exported
指定显式值,当相应的组件定义了意图过滤器时android: exported
。 有关详细信息,请参阅 https://developer.android.com/guide/topics/manifest/activity-element#exported。
我的AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyTheme">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:exported="true"
android:name=".Activities.SplashScreenActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
</activity>
</application>
</manifest>
这篇文章描述了一个解决方案,但它不起作用或者我做错了。 也许有人有类似的问题,请告诉我如何解决。
AndroidManifest.xml
。<intent-filter>
标签的哪个<activity>
缺少android:exported
属性Go to Declaration
然后添加android:exported
属性希望它会起作用。 这个对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.