安卓报错:Manifest merger failed : 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

Add the Activity with Intent-filter configured in the Manifestandroid: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>

Guess you like

Origin blog.csdn.net/m0_63324772/article/details/131642256