gpt4 book ai didi

添加了 android:exported 但仍然出现错误 需要针对 Android 12 及更高版本的应用程序才能为 android:exported 指定显式值

转载 作者:行者123 更新时间:2023-12-04 23:36:36 26 4
gpt4 key购买 nike

我已添加 android:exported="true"到我在 list 中的唯一 Activity ,但在将编译 sdk 和目标 sdk 版本更新为 31 后仍然低于错误。我还尝试重建项目,使缓存无效并重新启动,但这没有帮助
错误- 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. AndroidManifest 文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.abc">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:name=".framework.presentation.BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="com.xyz.presentation.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
合并 list 错误

Other Manifest Files (Included in merge, but did not contribute anyelements) firebase-installations:17.0.0 manifest,versionedparcelable:1.1.1 manifest, runtime:1.0.1 manifest,test:core:1.2.0 manifest, loader:1.0.0 manifest, facebook-share:11.1.0manifest, leakcanary:leaksentry:2.0-alpha-3 manifest,material-dialogs:input:3.2.1 manifest, material-icons-extended:1.0.0manifest, play-services-stats:17.0.0 manifest, interpolator:1.0.0manifest, activity-compose:1.3.1 manifest, material-ripple:1.0.0manifest, foundation:1.0.0 manifest, asynclayoutinflater:1.0.0manifest, savedstate-ktx:1.1.0 manifest,navigation-dynamic-features-fragment:2.3.5 manifest,firebase-ui-auth:7.2.0 manifest, animation:1.0.1 manifest,animation-core:1.0.1 manifest, installreferrer:1.0 manifest,firebase-crashlytics:18.0.0 manifest, ui:1.0.1 manifest,lifecycle-viewmodel-savedstate:2.3.1 manifest,play-services-auth-base:17.0.0 manifest, hilt-android:2.35.1 manifest,material-dialogs:core:3.2.1 manifest, AndroidManifest.xml navigationfile, savedstate:1.1.0 manifest, cursoradapter:1.0.0 manifest,sqlite-framework:2.0.1 manifest, room-ktx:2.1.0 manifest,leakcanary-android-core:2.0-alpha-3 manifest, AndroidManifest.xmlnavigation file, media:1.0.0 manifest, coordinatorlayout:1.1.0manifest, legacy-support-core-utils:1.0.0 manifest,lifecycle-runtime:2.3.1 manifest, coil-kt:coil:1.3.1 manifest,ui-tooling-preview:1.0.0 manifest, facebook-core:11.1.0 manifest,core:1.6.0 manifest, material:1.0.0 manifest, firebase-common:20.0.0manifest, documentfile:1.0.0 manifest,lifecycle-viewmodel-compose:2.4.0-beta01 manifest,play-services-base:17.1.0 manifest, ui-tooling-data:1.0.0 manifest,coil-base:1.3.1 manifest, firebase-analytics-ktx:19.0.0 manifest,localbroadcastmanager:1.0.0 manifest, swiperefreshlayout:1.1.0-alpha03manifest, constraintlayout-compose:1.0.0-beta02 manifest,core-ktx:1.6.0 manifest, firebase-database-collection:18.0.0 manifest,coil-compose-base:1.3.1 manifest, activity:1.3.1 manifest,AndroidManifest.xml navigation file, facebook-messenger:11.1.0manifest, print:1.0.0 manifest, customview:1.1.0 manifest,material-icons-core:1.0.0 manifest,play-services-measurement-sdk:19.0.0 manifest, fragment:1.3.4manifest, firebase-appcheck-interop:16.0.0-beta01 manifest,facebook-login:11.1.0 manifest, cardview:1.0.0 manifest,runtime-rxjava2:1.0.0 manifest, viewpager2:1.0.0 manifest,play-services-ads-identifier:17.0.0 manifest,play-services-measurement-impl:19.0.0 manifest,lifecycle-livedata-core:2.3.1 manifest, play-services-safetynet:17.0.0manifest, AndroidManifest.xml navigation file,lifecycle-viewmodel-ktx:2.3.1 manifest, transport-backend-cct:3.0.0manifest, fragment-ktx:1.2.4 manifest, appcompat:1.3.0 manifest,transport-runtime:3.0.0 manifest, lifecycle-livedata-core-ktx:2.2.0manifest, firebase-firestore-ktx:23.0.0 manifest,legacy-support-v4:1.0.0 manifest, play-services-basement:17.1.1manifest, firebase-storage:20.0.0 manifest,play-services-auth-api-phone:17.4.0 manifest,leakcanary-android:2.0-alpha-3 manifest, firebase-auth-interop:20.0.0manifest, lifecycle-viewmodel:2.3.1 manifest, browser:1.0.0 manifest,firebase-auth:21.0.1 manifest, material:1.2.1 manifest,slidingpanelayout:1.0.0 manifest, vectordrawable:1.1.0 manifest,recyclerview:1.1.0 manifest, play-services-auth:19.0.0 manifest,room-runtime:2.1.0 manifest, dagger-lint-aar:2.35.1 manifest,navigation-dynamic-features-runtime:2.3.5 manifest,play-services-measurement-api:19.0.0 manifest,firebase-encoders-json:18.0.0 manifest, sqlite:2.0.1 manifest,facebook-android-sdk:11.1.0 manifest, firebase-components:17.0.0manifest, transport-api:3.0.0 manifest,protolite-well-known-types:18.0.0 manifest, markdown-processor:0.1.3manifest, play-services-measurement-base:19.0.0 manifest,firebase-common-ktx:20.0.0 manifest, activity-ktx:1.3.1 manifest,firebase-crashlytics-ktx:18.0.0 manifest, coil-compose:1.3.1 manifest,multidex:2.0.1 manifest, core-runtime:2.1.0 manifest,fragment-testing:1.2.0 manifest, ui-graphics:1.0.1 manifest,AndroidManifest.xml navigation file, ui-tooling:1.0.0 manifest,grpc-android:1.28.0 manifest, ui-unit:1.0.1 manifest,play-services-measurement:19.0.0 manifest, play:core:1.9.1 manifest,annotation-experimental:1.1.0 manifest,play-services-measurement-sdk-api:19.0.0 manifest,play-services-tasks:17.0.0 manifest, firebase-analytics:19.0.0manifest, facebook-common:11.1.0 manifest, drawerlayout:1.1.1manifest, AndroidManifest.xml navigation file,navigation-compose:2.4.0-alpha09 manifest,facebook-gamingservices:11.1.0 manifest, firebase-firestore:23.0.0manifest, lifecycle-livedata:2.2.0 manifest,legacy-support-core-ui:1.0.0 manifest, test:monitor:1.2.0 manifest,AndroidManifest.xml navigation file, facebook-applinks:11.1.0manifest, viewpager:1.0.0 manifest, ui-geometry:1.0.1 manifest,lifecycle-runtime-ktx:2.3.1 manifest, constraintlayout:2.0.4 manifest,ui-text:1.0.1 manifest, AndroidManifest.xml navigation file,firebase-installations-interop:17.0.0 manifest, transition:1.3.0manifest, foundation-layout:1.0.1 manifest, appcompat-resources:1.3.1manifest, runtime-livedata:1.0.0 manifest, runtime-saveable:1.0.1manifest, firebase-measurement-connector:19.0.0 manifest,vectordrawable-animated:1.1.0 manifest, main nav_graph.xml navigationfile Merging Errors: Error: android:exported needs to be explicitlyspecified for . Apps targeting Android 12 and higher arerequired to specify an explicit value for android:exported when thecorresponding component has an intent filter defined. Seehttps://developer.android.com/guide/topics/manifest/activity-element#exportedfor details. Dairy.app main manifest (this file) Error:android:exported needs to be explicitly specified for . Appstargeting Android 12 and higher are required to specify an explicitvalue for android:exported when the corresponding component has anintent filter defined. Seehttps://developer.android.com/guide/topics/manifest/activity-element#exportedfor details. Dairy.app main manifest (this file) Error:android:exported needs to be explicitly specified for . Appstargeting Android 12 and higher are required to specify an explicitvalue for android:exported when the corresponding component has anintent filter defined. Seehttps://developer.android.com/guide/topics/manifest/activity-element#exportedfor details. Dairy.app main manifest (this file)

最佳答案

androidx.test:core库版本 1.3.0。升级到 1.4.0 版解决了这个问题。

关于添加了 android:exported 但仍然出现错误 需要针对 Android 12 及更高版本的应用程序才能为 android:exported 指定显式值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69287478/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com