* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : android:exported needs to be explicitly specified for <receiver>. 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.
此错误正在抛出我的颤振应用程序。我在所有活动和服务中设置android:exported=“true”。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_CALL_LOG"></uses-permission>
<uses-permission android:name="android.permission.WRITE_CALL_LOG"></uses-permission>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<application
android:label="My APP"
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
android:hardwareAccelerated="false"
android:largeHeap="true"
android:icon="@mipmap/launcher_icon">
<meta-data android:name="io.flutter.network-policy"
android:resource="@xml/network_security_config"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/rsoft_logo" />
<activity
android:usesCleartextTraffic="true"
android:name=".MainActivity"
android:exported="true"
android:enabled="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:exported="true"
android:enabled="true"
android:theme="@style/Theme.AppCompat.Dialog.MinWidth"
android:name=".PopUpActivity"/>
<receiver android:name=".CallReceiver"
android:exported="true"
android:enabled="true"
android:permission="android.permission.BIND_JOB_SERVICE">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
参考图像
请制作
android:exported="false"
在除主活动外的所有活动、服务、接收者中
请检查内部版本。gradle文件:
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.fragment:fragment-testing:1.4.1"
androidTestImplementation "androidx.test:core:1.4.0"
并且可以简单地编辑接收器
1.首先将目标sdk设置为30
2、然后转到合并清单
3.查找是否有任何活动、服务、接收者或提供者没有android:导出设置。覆盖所有这些条目并将它们的android:导出设置为true或false。
4.set目标sdk回到31并运行项目
当我试图编译一个APK文件时,我遇到了下一个错误:
我正在进行一个react原生项目,但当我尝试通过终端进行构建时,我收到了一条消息错误:“当相应组件定义了intent过滤器时,针对Android 12和更高版本的应用程序需要为指定显式值。请参阅https://developer.android.com/guide/topics/manifest/activity-element#exported有关详细信息,请参阅。“我发现了其他问题,答案似乎是
请帮我解决这个错误,在我的项目中,同时尝试通过android Studio在移动设备上运行。 清单合并失败:当相应的组件定义了意向过滤器时,面向 Android 12 及更高版本的应用需要为 指定一个显式值。有关详细信息,请参阅 https://developer.android.com/guide/topics/manifest/activity-element#exported。
当我试图编译一个APK文件时,我得到了下一个错误: 我有这样的价值,但AGP看不到。我的价值清单: AGP 版本: 4.2.2 除了降级之外,还有其他解决方法吗?
我是爪哇和机器人的新手。在运行模拟器时,我面临着合并冲突问题。 完整的错误消息: 执行任务失败:process DefaultsDebugMainManifest。 清单合并失败,出现多个错误,请参阅日志 错误:需要为元素显式指定android:exported 此处为AndroidManifest.xml 和构建渐变 我已经尝试了StackOverflow上的许多其他解决方案,但仍然没有取得任何
我已经检查了清单中的所有活动。xml文件中,所有活动都存在android:exported=“true”,但它始终显示此错误**清单合并失败:需要为元素显式指定android:exported 我的清单文件是 Gradle构建 等待早期响应