I have created a basic android flutter application using Android Studio. I remember running this app few times but all of a sudden it doesnt run. Tried changing the targetSdkVersion and compileSdkVersion from 27 to 28 as per few helps out there, but this did not work. Trying to understand the base of the problem since I am very new to Android development.
What I noticed: Below error is thrown only when I add geolocator or location package in pubspec.yaml and import it. If I remove it, the app works fine
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