flutter_appavailability icon indicating copy to clipboard operation
flutter_appavailability copied to clipboard

Unable to build release

Open ghost opened this issue 5 years ago • 7 comments

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.

ghost avatar Dec 16 '19 00:12 ghost

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"

while-loop avatar Dec 26 '19 03:12 while-loop

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"

xni06 avatar Dec 26 '19 15:12 xni06

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.

jeroen-meijer avatar Jan 14 '20 02:01 jeroen-meijer

Thanks @rhisiart-cufflink, I've edited my comment. 👍🏻

jeroen-meijer avatar Jan 14 '20 08:01 jeroen-meijer

Same issue.

pankti16 avatar Mar 19 '20 05:03 pankti16

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

eltonmorais avatar May 02 '20 11:05 eltonmorais

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 maat, that's what I needed to know 👍

BrutalCoding avatar Nov 09 '20 01:11 BrutalCoding