Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targ

  • Post author:
  • Post category:其他

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.

出现错误,解决办法:在有intent的Activity中,加上android:exported="true"

<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>

版权声明:本文为qq_46070108原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。