迁移到AndroidX包括新属性fontVariationSettings和ttcIndex。我曾尝试迁移项目(Flutter插件),但在进行gradle构建时遇到以下错误。许多用户与我有相同的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
答案 0 :(得分:0)
结果是,我的Flutter应用程序中包含另一个尚未升级到AndroidX的Android项目。所以我升级了那个项目,问题就解决了。