FlutterToast: getting error on android
Hi, I am using v2.2.5 and when I try to run my code I get error:(even when I only add the package pubspec.yaml and don’t import that in code)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:956: error: resource android:attr/fontVariationSettings not found.
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:957: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\451c100d8bf9a65f95ef6aa052d39f8f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Dell\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
--manifest\
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
@C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Projects\Hamayesh\hamayesh\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.hamayesh\
-0\
apk\
--output-text-symbols\
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\appcompat-1.0.2.aar\ecd6e2b9bb4b92916609cb0c2e58164c\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\core-1.0.1.aar\00977c9949f24ec591bbf642eb5a1280\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\core-1.0.1.aar\00977c9949f24ec591bbf642eb5a1280\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Dell\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\451c100d8bf9a65f95ef6aa052d39f8f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Dell\AppData\Local\Android\Sdk\platforms\android-27\android.jar\
--manifest\
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Projects\Hamayesh\hamayesh\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
@C:\Projects\Hamayesh\hamayesh\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Projects\Hamayesh\hamayesh\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.hamayesh\
-0\
apk\
--output-text-symbols\
C:\Projects\Hamayesh\hamayesh\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 --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
Finished with error: Gradle task assembleDebug failed with exit code 1
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 16 (8 by maintainers)
@DFilipeS are you using androidX components somewhere in you app? If yes, you have to use 2.2.5.
@Boehrsi the issue is with dependencies we cannot combine androidx and normal previous dependencies
as a temporary fix use v2.2.3
就这个问题,我找了4个小时!!!