android - 任务 ':app:processDebugResources' 的 Flutter 执行失败。 AAPT : error: resource string/app_name not found

标签 android dart flutter

当我要在 Android 设备上运行应用程序时,我收到以下错误消息。

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugResources'. Android resource linking failed /Users/uzerx/Documents/Ameerrraj/Work/ClubEvent/club_event/build/app/intermediates/merged_manifests/debug/AndroidManifest.xml:65: AAPT: error: resource string/app_name (aka com.mobileapp.club_event:string/app_name) not found.

    error: failed processing manifest.

  • 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.

BUILD FAILED in 25s The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See for more information on the problem and how to fix it. Finished with error: Gradle task assembleDebug failed with exit code 1

我哪里出错了。

下面是AndroidManifest.xml

enter image description here

project/gradle.properties

org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

已编辑

strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="facebook_app_id">2206883509627625</string>
    <string name="fb_login_protocol_scheme">fb2206883509627625</string>
</resources>

最佳答案

<string name="app_name">Your App Name here</string>缺少请添加此。

喜欢

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">App Name here</string>
    <string name="facebook_app_id">2206883509627625</string>
    <string name="fb_login_protocol_scheme">fb2206883509627625</string>
</resources>

关于android - 任务 ':app:processDebugResources' 的 Flutter 执行失败。 AAPT : error: resource string/app_name not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55063482/

相关文章:

flutter - 如何在 Dart 中将 double 转换为 int ?

java - java中改变布局背景颜色之间的差异

android - 使用 OpenCV4Android,如何从轮廓创建 ROI(感兴趣区域或子垫)?

unit-testing - 我如何在Dart中的then语句中进行测试

dart - 在 Dart 中等待按键

flutter - 如何增加 flutter 底部导航栏中选定图标的大小

java - 运行时权限应该采用相同的方法。如何正确处理?

android - 将自定义 Android Activity/ View 链接到 React Native

dart - SSL 错误阻止网站登录 flutter

flutter - 在 RenderBox HitTest 之后添加到对象