合并错误:错误:需要为元素.显式指定android:导出当相应的组件定义了意图过滤器时,针对Android12及更高版本的应用程序需要为android:exported指定一个显式值。详细信息请参见https://developer.android.com/guide/topics/manifest/activity-element#exported
发布于 2022-03-17 08:05:10
在清单文件(AndroidManifest.xml)中,在ReportingContainerActivity的活动标记中添加android:exported="true“。
发布于 2022-03-17 08:38:31
看看我的舱单,还是一样的问题
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="d2si.apps.planetepicking">
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<permission
android:name="d2si.apps.planetepicking.permission.SCANNER_RESULT_RECEIVER"
android:protectionLevel="normal" />
<uses-permission android:name="d2si.apps.planetepicking.permission.SCANNER_RESULT_RECEIVER" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<application
android:name=".App"
android:persistent="true"
android:allowBackup="true"
android:icon="@mipmap/ic_roundicon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_roundicon"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:node="merge">
<activity android:name=".interfaceuser.MainActivity"
android:theme="@style/AppTheme3"
android:screenOrientation="fullSensor"
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=".interfaceuser.ConfigActivity"
android:theme="@style/AppTheme3"
android:screenOrientation="fullSensor"
android:exported="true"
tools:node="merge"
>
<intent-filter>
<action android:name="android.intent.action.CF" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".interfaceuser.CommandeActivity"
android:screenOrientation="fullSensor"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.CMD" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".interfaceuser.Configuration"
android:screenOrientation="fullSensor"
android:theme="@style/AppTheme3"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.CNF" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".interfaceuser.LoginActivity"
android:screenOrientation="fullSensor"
android:theme="@style/AppTheme3"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.LG" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".interfaceuser.AccueilActivity"
android:screenOrientation="fullSensor"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.ACC" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".interfaceuser.PreparationActivity"
android:screenOrientation="fullSensor"
android:theme="@style/AppTheme3"
android:windowSoftInputMode="stateHidden|adjustPan"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.PREP" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="device.scanner.EVENT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
<activity
android:name=".interfaceuser.DisplayActivity"
android:screenOrientation="fullSensor"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".interfaceuser.Demarrer_PrepActivity"
android:screenOrientation="fullSensor"
android:exported="true"
tools:node="merge">
<intent-filter>
<action android:name="android.intent.action.DEM" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
https://stackoverflow.com/questions/71508782
复制相似问题