gpt4 book ai didi

android - 迁移到AndroidX后,已经将compileSdkVersion更新为28,但是仍然收到关于fontVariationSettings和ttcIndex的gradle错误

转载 作者:行者123 更新时间:2023-12-03 05:37:45 26 4
gpt4 key购买 nike

迁移到AndroidX包括新属性fontVariationSettings和ttcIndex。我曾尝试迁移项目(Flutter插件),但在进行gradle构建时遇到以下错误。许多用户与我有相同的gradle错误,但与他们不同的是,我已经

  • 在我的build中将我的compileSdkVersion升级到28.gradle
  • 在gradle.properties中添加了android.useAndroidX = true和android.enableJetifier = true
  • 通过Android Studio重置Gradle缓存(无效缓存/重启)

  • 我的控制台输出:
    FAILURE: Build failed with an exception.
    * What went wrong:
    Execution failed for task ':app:processDebugResources'.
    > Android resource linking failed
    /Users/davidmccoy/.gradle/caches/transforms-1/files-1.1/core-1.0.0-beta01.aar/f004b9e22a129b2d333d02089203fb0d/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
    /Users/davidmccoy/.gradle/caches/transforms-1/files-1.1/core-1.0.0-beta01.aar/f004b9e22a129b2d333d02089203fb0d/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
    error: failed linking references.
    * 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 1s
    *******************************************************************************************
    The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
    See https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility for more information on the problem and how to fix it.
    *******************************************************************************************
    Gradle task assembleDebug failed with exit code 1

    最佳答案

    原来,我在Flutter应用程序中包含的另一个Android项目尚未升级到AndroidX。所以我升级了那个项目,问题就解决了。

    关于android - 迁移到AndroidX后,已经将compileSdkVersion更新为28,但是仍然收到关于fontVariationSettings和ttcIndex的gradle错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54936775/

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