Android 12如何避免导出值错误

问题描述 投票:0回答:1

我在生成 APK 时看到以下问题,奇怪的是问题发生在 androidTest 文件夹下,我还添加了标签

android:exported="false" under each activity tag
请告诉我一个修复程序

/Users/userName/projectXYZ/build/intermediates/tmp/manifest/androidTest/qual/debug/tempFile1ProcessTestManifest4615853503946390592.xml:27:9-33:20 错误: android:exported 需要为元素 明确指定。当相应组件定义了 Intent 过滤器时,针对 Android 12 及更高版本的应用需要为

android:exported
指定一个明确的值。有关详细信息,请参阅https://developer.android.com/guide/topics/manifest/activity-element#exported

android kotlin android-manifest androidexported
1个回答
0
投票

你没有写

androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity
。那是来自图书馆。确保您使用的是最新版本的
androidx.test:core
,例如:

implementation "androidx.test:core:1.5.0"
© www.soinside.com 2019 - 2024. All rights reserved.