for <activity>. 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.
ребят, как от ошибки избавиться?
1 манифест (библа):
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nxp.nfclib"
android:versionCode="1"
android:versionName="1.9" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="29" />
<uses-permission android:name="android.permission.NFC" />
<application
android:allowBackup="false"
android:label="@string/app_name"
android:supportsRtl="true" >
<receiver
android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false" />
<!--
Optionally, register CampaignTrackingReceiver and CampaignTrackingService to enable
installation campaign reporting
-->
<receiver
android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.CampaignTrackingService" />
</application>
</manifest>
2 манифест (прила)
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="sdfsdf.rqwitop.passcheckernxpnfc">
<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-feature
android:name="android.hardware.nfc"
android:required="true"/>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="false"
android:smallScreens="true"
android:xlargeScreens="true"/>
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
tools:replace="android:allowBackup"
android:description="@string/app_name"
android:theme="@style/Theme.PasscheckerNxpNfc">
<uses-library android:name ="org.apache.http.legacy" android:required ="false"/>
<activity
android:name=".SplashActivity"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
не надо так, постить полотнища в чат, есть пастебин
тебе человеческим языком сказали "android:exported needs to be explicitly specified for <activity>"
Бывает. Не все умеют читать)
человеческим языком говорю он везде добавлен
Обсуждают сегодня