flutter_appavailability
flutter_appavailability copied to clipboard
Unable to build release
When running on release mode, I get a build error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_appavailability:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
C:\Users\hugoc\IdeaProjects\Flutter\buster\build\flutter_appavailability\intermediates\res\merged\release\values\values.xml:236: error: resource android:attr/fontVariationSettings not found.
C:\Users\hugoc\IdeaProjects\Flutter\buster\build\flutter_appavailability\intermediates\res\merged\release\values\values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.
This error can be reproduced in any project. Just add the dependency and try to run on release mode or build an apk/app-bundle.
Don't know whether iOS has been affected, since I just tested on Android.
I started to encounter this error as soon as I updated Flutter to v1.12.13+hotfix.5. Previously, I was using Flutter v1.9.1+hotfix.6.
I changed to use https://github.com/bwhiteTP/flutter_appavailability 's target version fix
flutter_appavailability:
git:
url: "https://github.com/bwhiteTP/flutter_appavailability.git"
ref: "26461d5296cd8c0a58da1d9c5f1e960643ebb323"
I changed to use https://github.com/bwhiteTP/flutter_appavailability 's target version fix
flutter_appavailability: git: url: "https://github.com/bwhiteTP/flutter_appavailability.git" ref: "26461d5296cd8c0a58da1d9c5f1e960643ebb323"
or you can reference the existing pull request a9e2fa38d8c9334c89d13c69c69db29030c926d5 in this repo by using the following instead:
flutter_appavailability:
git:
url: "https://github.com/pichillilorenzo/flutter_appavailability.git"
ref: "a9e2fa38d8c9334c89d13c69c69db29030c926d5"
Same issue here, this really needs to be fixed.
Until this is fixed, I recommend using device_apps in the meantime. Sadly, however, that plugin does not support iOS.
Thanks @rhisiart-cufflink, I've edited my comment. 👍🏻
Same issue.
I changed to use https://github.com/bwhiteTP/flutter_appavailability 's target version fix
flutter_appavailability: git: url: "https://github.com/bwhiteTP/flutter_appavailability.git" ref: "26461d5296cd8c0a58da1d9c5f1e960643ebb323"
This solved here. Flutter v1.12.13+hotfix.9
Same issue here, this really needs to be fixed.
Until this is fixed, I recommend using
device_appsin the meantime. Sadly, however, that plugin does not support iOS.
Thanks maat, that's what I needed to know 👍