gpt4 book ai didi

android - AAPT2 编译失败 : invalid dimen on Android 3. 0 Canary 1

转载 作者:IT老高 更新时间:2023-10-28 13:07:16 26 4
gpt4 key购买 nike

我正在玩适用于 Android 的 Instant Apps。我安装了所有正确的软件包,并且厌倦了创建具有 Instant App 支持的新应用程序(在创建新应用程序时选中 Instant App 框)。问题是我总是遇到编译工具的问题。有没有其他人有这个问题并且能够找到任何解决方法。

我的环境:

  • Android Studio 3.0 Canary 1
  • 编译SDK:25
  • 构建工具:“26.0.0 rc2”
  • Gradle 插件:3.0.0-alpha1
  • Gradle:尝试了 gradle-4.0-milestone1 和 2
  • Java 1.8/1.7
  • 操作系统:尝试了 Windows 10 和 Linux Ubuntu 16.4 LTS

  • 错误:

    Error: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
    aapt2 compile -o /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/res/merged/androidTest/debug /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml
    Issues:
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:520 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:521 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:568 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:594 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:595 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:597 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:598 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:599 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:600 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:601 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:602 invalid dimen
    - ERROR: /home/simonp/Work/201705_InstantApp/InstantAppTest/feature/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:603 invalid dimen
    :feature:mergeDebugAndroidTestResources FAILED

    有问题的行包含 (520):
    <item format="float" name="abc_disabled_alpha_material_dark" type="dimen">0.30</item>

    希望我为您提供了足够的信息来解决问题。谢谢你。

    最佳答案

    解决方法是将您的开发机器切换到使用“.”的语言环境。作为小数点。

    可以通过以下方式更改:

    enter image description here

    关于android - AAPT2 编译失败 : invalid dimen on Android 3. 0 Canary 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44196672/

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