当前位置:   article > 正文

安卓报错:Manifest merger failed : android:exported needs to be explicitly specified for element

android:exported needs to be explicitly specified for element

解决安卓报错:Manifest merger failed : android:exported needs to be explicitly specified for element <activity#com.team.sportsskuyy.MainActivity>. 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.

image-20230710162434953

将Manifest中有配置Intent-filter的Activity加上android:exported属性

image-20230710162526590

<activity
    android:name=".MainActivity"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme.NoActionBar"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/824115?site
推荐阅读
相关标签