我已经使用android Studio创建了一个基本的android颤振应用程序。我记得运行过几次这个应用程序,但突然它不运行了。根据一些帮助,尝试将targetSdkVersion和compileSdkVersion从27更改为28,但没有成功。试图了解问题的根源,因为我对Android开发非常陌生。
我注意到的:只有当我在pubspec.yaml中添加地理定位器或位置包并导入它时,才会出现以下错误。如果我删除它,应用程序工作正常
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\incremental\mergeDebugResources\merged.
dir\values\values.xml:197: error: resource android:attr/fontVariationSettings not found.
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\value
s\values.xml:198: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\digi_yb\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\0a870866429dd545bdd071cb7f1
72c92\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\digi_yb\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\merged_manifests\debug\processDebugManif
est\merged\AndroidManifest.xml\
-o\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\processed_res\debug\processDebugResource
s\out\resources-debug.ap_\
-R\
@C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\incremental\processDebugResources\resou
rces-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\generated\not_namespaced_r_class_sources\debug\process
DebugResources\r\
--custom-package\
de.digi3.digi3app\
-0\
apk\
--output-text-symbols\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\digi_yb\.gradle\caches\transforms-1\files-1.1\core-1.0.0-rc01.aar\037167aeb6c73f9e63ab1315d785696d\res\va
lues\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\digi_yb\.gradle\caches\transforms-1\files-1.1\core-1.0.0-rc01.aar\037167aeb6c73f9e63ab1315d785696d\res\values\valu
es.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\digi_yb\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\0a870866429dd545bdd071cb7f1
72c92\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\digi_yb\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\merged_manifests\debug\processDebugManif
est\merged\AndroidManifest.xml\
-o\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\processed_res\debug\processDebugResource
s\out\resources-debug.ap_\
-R\
@C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\incremental\processDebugResources\resou
rces-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\generated\not_namespaced_r_class_sources\debug\process
DebugResources\r\
--custom-package\
de.digi3.digi3app\
-0\
apk\
--output-text-symbols\
C:\Users\digi_yb\Documents\flutter_tests\digi3_app\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --sca
n to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
Gradle task 'assembleDebug'... Done 15.3s
Gradle task assembleDebug failed with exit code 1
错误告诉我您尚未更新编译SDK版本。:)“android-27”意味着您仍在使用编译SDK版本27。也许您忘记了保存,或者其他东西正在覆盖它?它应该是版本28。
我只是导入了包background\u位置,没有使用它。即使我犯了这个错误 尝试更改kotlin版本,更改了MinSDK版本,但没有更改。
因为google_api_headers
/D:/flutter/. pub-ache/pub.dartlang.org/path_provider_windows-0.0.43/lib/src/path_provider_windows_real.dart:126: 25:错误:getter'addressOf'没有为类'GUID'定义。 “GUID”来自“包:win32/src/结构”(“/D:/颤动/缓存/托管/发布/达特朗.org
我正在Linux Ubuntu上配置Flatter SDK 我在文件中为和指定了,但我在运行时收到此错误:
我创建了一个新的应用程序。 从https://pub.dev/packages/audioplayers添加了audioplayers flutter包。 显示Android嵌入的错误。我按照说明https://flutter.dev/go/android-project-migration进行操作。 现在我得到这个错误:
首先,抱歉英语不好。我从Flatter开始,我已经安装了所有必要的东西,但是当尝试运行测试应用程序(在模拟器或设备中)时,我会收到下面的错误消息。 正在启动lib\main。调试模式下XT1097上的dart。。。正在初始化gradle。。。正在解析依赖项…*运行Gradle时出错:从以下位置退出代码1:C:\Testes\first\u app\android\gradlew。bat应用程序:属