gpt4 book ai didi

android - 无法生成签名包 - Android 资源链接失败,错误 : invalid config 'auto' for -c option

转载 作者:太空宇宙 更新时间:2023-11-03 13:08:09 26 4
gpt4 key购买 nike

将 Android Studio 更新到 v 3.2 后,我在第一次尝试生成 Signed Bundle 时遇到错误:

    Android resource linking failed
Output: error: invalid config 'auto' for -c option.

Command: /home/yuliia/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-4818971-linux.jar/3c2f2255ccccab2125c4cc0eaccd5fdd/aapt2-3.2.0-4818971-linux/aapt2 link --proto-format\
-I\
/home/yuliia/Android/Sdk/platforms/android-27/android.jar\
--manifest\
/home/yuliia/Documents/projects/android_projects/OCRme/app/build/intermediates/merged_manifests/release/processReleaseManifest/merged/AndroidManifest.xml\
-o\
/home/yuliia/Documents/projects/android_projects/OCRme/app/build/intermediates/linked_res_for_bundle/release/bundleReleaseResources/bundled-res.ap_\
-R\
/home/yuliia/Documents/projects/android_projects/OCRme/app/build/intermediates/res/merged/release/color_abc_tint_seek_thumb.xml.flat\
-R\
/home/yuliia/Documents/projects/android_projects/OCRme/app/build/intermediates/res/merged/release/drawable-xhdpi-v4_abc_popup_background_mtrl_mult.9.png.flat\
-R\
/home/yuliia/Documents/projects/android_projects/OCRme/app/build/intermediates/res/merged/release/drawable-xxhdpi-v4_abc_btn_check_to_on_mtrl_015.png.flat\
-R\
....
/home/yuliia/Documents/projects/android_projects/OCRme/app/build/intermediates/res/merged/release/layout_activity_get_more_requests.xml.flat\
--auto-add-overlay\
-0\
apk\
-c\
auto\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-linux Daemon #0

我怎样才能让它发挥作用?

最佳答案

您必须为 resConfig 使用“自动”选项。 “auto”已从标准构建中弃用,并且在 bundle 中不受支持(错误弹出后警告可能在日志中丢失):

android {
defaultConfig {
...
resConfigs "auto"
}
}

bundle 中仍然支持非“自动”resConfig,因此只需指定您想要保留的语言,如 documentation 中所述。 :

android {
defaultConfig {
...
resConfigs "en", "fr"
}
}

关于android - 无法生成签名包 - Android 资源链接失败,错误 : invalid config 'auto' for -c option,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52561487/

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