gpt4 book ai didi

gradle - Flutter Assembledebug linking error app will not compile,什么都试过了

转载 作者:IT王子 更新时间:2023-10-29 07:04:38 26 4
gpt4 key购买 nike

失败:构建失败,出现异常。

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: /home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:905: error: resource android:attr/fontVariationSettings not found.
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:905: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Command: /home/ollie2224/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/5495ad1b91b297bb4c274b380506e4f6/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/home/ollie2224/Android/Sdk/platforms/android-26/android.jar\
--manifest\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
@/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/home/ollie2224/StudioProjects/24Hrs/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--custom-package\
com.rookieplays.tf\
-0\
apk\
--output-text-symbols\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/symbols/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0
Output: /home/ollie2224/.gradle/caches/transforms-1/files-1.1/appcompat-1.0.0.aar/7ffba96d1618b0c08b4da202d0eddb85/res/values-v28/values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.

/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values-v28/values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.

/home/ollie2224/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/21a52465ad0e625487952f3012c37e7c/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.

/home/ollie2224/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/21a52465ad0e625487952f3012c37e7c/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.

error: failed linking references.
Command: /home/ollie2224/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/5495ad1b91b297bb4c274b380506e4f6/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/home/ollie2224/Android/Sdk/platforms/android-26/android.jar\
--manifest\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
@/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/home/ollie2224/StudioProjects/24Hrs/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--custom-package\
com.rookieplays.tf\
-0\
apk\
--output-text-symbols\
/home/ollie2224/StudioProjects/24Hrs/build/app/intermediates/symbols/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0

* 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 31s
Finished with error: Gradle task assembleDebug failed with exit code 1

最佳答案

这看起来像 https://github.com/flutter/flutter/issues/27106

您可能已更新到最新的插件,但尚未迁移到 AndroidX,这是最新插件版本所必需的。

有关详细信息,请参阅 https://github.com/flutter/flutter/issues/27128#issuecomment-458274311

https://developer.android.com/jetpack/androidx/migrate

With Android Studio 3.2 and higher, you can quickly migrate an existing project to use AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.

为此,您需要直接打开项目的android/ 目录https://flutter.io/docs/development/tools/android-studio#android-ide

关于gradle - Flutter Assembledebug linking error app will not compile,什么都试过了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54459343/

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