[英]Manifest merger failed : android:exported needs to be explicitly specified for <activity>
I have a problem with a manifest file, error message:我的清单文件有问题,错误消息:
Manifest merger failed : android: exported needs to be explicitly specified for .
清单合并失败:android:需要为 明确指定导出。 Apps targeting Android 12 and higher are required to specify an explicit value for
android: exported
when the corresponding component has an intent filter defined.面向 Android 12 及更高版本的应用需要为
android: exported
指定显式值,当相应的组件定义了意图过滤器时android: exported
。 See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.有关详细信息,请参阅 https://developer.android.com/guide/topics/manifest/activity-element#exported。
My AndroidManifest:我的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>
This post describes a solution but it doesn't work or I made something wrong.这篇文章描述了一个解决方案,但它不起作用或者我做错了。 Maybe anyone has a similar problem, please let me know how to resolve that.
也许有人有类似的问题,请告诉我如何解决。
AndroidManifest.xml
.AndroidManifest.xml
。<activity>
that includes an <intent-filter>
tag is missing the android:exported
attribute<intent-filter>
标签的哪个<activity>
缺少android:exported
属性Go to Declaration
then add android:exported
attributeGo to Declaration
然后添加android:exported
属性Hope it will work.希望它会起作用。 It works for me.
这个对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.