我在调试时突然遇到错误,它只是正常工作,当我尝试在main.dart中加载新屏幕时弹出这个错误。
错误
在调试模式下为x86构建的Android SDK上启动lib \ main.dart ...
FAILURE:构建因异常而失败。
- 出了什么问题:任务':app:processDebugResources'执行失败。
Android资源链接失败输出:C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ incremental \ mergeDebugResources \ merged.dir \ values \ values.xml:225:错误:资源android:attr / fontVariationSettings not found。 C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ incremental \ mergeDebugResources \ merged.dir \ values \ values.xml:225:错误:资源android:attr / ttcIndex未找到。错误:链接引用失败。
命令:C:\ Users \ Sam.gradle \ _caches \ transforms-1 \ files-1.1 \ aapt2-3.2.1-4818971-windows.jar \ a2fedb806fdcf1039dc8366793f0d803 \ aapt2-3.2.1-4818971-windows \ aapt2.exe链接 - 我\ C:\ Users \ Sam \ AppData \ Local \ Android \ sdk \ platforms \ android-27 \ android.jar \ --manifest \ C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ merged_manifests \ debug \ processDebugManifest \ merged \ AndroidManifest.xml \ -o \ C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ processed_res \ debug \ processDebugResources \ out \ resources-debug.ap_ \ -R \ @C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ incremental \ processDebugResources \ resources-list-for-resources-debug.ap_.txt \ --auto-add-overlay \ --java \ C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ generated \ not_namespaced_r_class_sources \ debug \ processDebugResources \ r \ --custom-package \ com.example.lightbridgemobile \ -0 \ apk \ --output-text-symbols \ C:\ LightBridge_Mobile \ lightbridge_mobile \ Li ghtBridge \ build \ app \ intermediates \ symbols \ debug \ R.txt \ --no-version-vectors守护程序:AAPT2 aapt2-3.2.1-4818971-windows守护程序#0输出:C:\ Users \ Sam.gradle \ caches \ transforms-1 \ files-1.1 \ core-1.0.0.aar \ 44d43b22d49402bbb3cf830f8d41ead1 \ res \ values \ values.xml:89:5-125:25:AAPT:错误:资源android:attr / fontVariationSettings not found。
C:\ Users \ Sam.gradle \ _caches \ transforms-1 \ files-1.1 \ core-1.0.0.aar \ 44d43b22d49402bbb3cf830f8d41ead1 \ res \ values \ values.xml:89:5-125:25:AAPT:错误:资源android:attr / ttcIndex未找到。
错误:链接引用失败。命令:C:\ Users \ Sam.gradle \ _caches \ transforms-1 \ files-1.1 \ aapt2-3.2.1-4818971-windows.jar \ a2fedb806fdcf1039dc8366793f0d803 \ aapt2-3.2.1-4818971-windows \ aapt2.exe链接 - 我\ C:\ Users \ Sam \ AppData \ Local \ Android \ sdk \ platforms \ android-27 \ android.jar \ --manifest \ C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ merged_manifests \ debug \ processDebugManifest \ merged \ AndroidManifest.xml \ -o \ C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ processed_res \ debug \ processDebugResources \ out \ resources-debug.ap_ \ -R \ @C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ intermediates \ incremental \ processDebugResources \ resources-list-for-resources-debug.ap_.txt \ --auto-add-overlay \ --java \ C:\ LightBridge_Mobile \ lightbridge_mobile \ LightBridge \ build \ app \ generated \ not_namespaced_r_class_sources \ debug \ processDebugResources \ r \ --custom-package \ com.example.lightbridgemobile \ -0 \ apk \ --output-text-symbols \ C:\ LightBridge_Mobile \ lightbridge_mobile \ Li ghtBridge \ build \ app \ intermediates \ symbols \ debug \ R.txt \ --no-version-vectors守护进程:AAPT2 aapt2-3.2.1-4818971-windows守护进程#0
- 尝试:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获得完整的见解。
- 在https://help.gradle.org获得更多帮助
建于18世纪的失败
Gradle失败可能是因为此Flutter应用中的AndroidX不兼容。
Gradle任务assembleDebug失败,退出代码1退出(sigterm)