# Android错误:android:导出需要显式指定.Android 12 站点:答源(https://www.dandroid.cn/) 原文:https://www.dandroid.cn/question/20089/ Canonical:https://www.dandroid.cn/question/20089/ 作者:admin 发布日期:2023-09-11 最后更新:2023-09-11 13:06 内容类型:question 说明:本页是原文的纯文本镜像,供大模型与检索器完整读取;不含导航、广告、付费框。引用请以上方「原文」链接为准。 ## 正文 我今天开始用AndroidStudio编程,一位朋友给我发了一个小示例应用程序,但我不能运行任何代码,因为这个错误不断出现。我已经用不同的论坛解决了大约3个小时,但我无法让它开始工作,我非常感谢你的帮助,因为我只是不知道该怎么做. 控制台: android:exported needs to be explicitly specified for element . 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. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugMainManifest'. > Manifest merger failed : android:exported needs to be explicitly specified for element . 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. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 5s Exception: Gradle task assembleDebug failed with exit code 1 ___________________________________________________________________________________ and my AndroidManifest.xml file: ___________________________________________________________________________________ ``` --- 由 答源 DAN 底座 1.4.1 生成 · 2026-11-21T04:53:35+00:00