我的 list 文件有问题,错误消息:
Manifest merger failed : android: exported needs to be explicitly specified for . 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. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
我的安卓 list :
<?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>
这个post描述了一个解决方案,但它不起作用或者我做错了什么。也许有人有类似的问题,请告诉我如何解决。
最佳答案
AndroidManifest.xml
. <activity>
其中包括 <intent-filter>
标签缺少 android:exported
属性 Go to Declaration
然后添加 android:exported
Activity 标签的属性 希望它会奏效。这个对我有用。
关于java - list 合并失败 : android:exported needs to be explicitly specified for <activity>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69497972/