pichillilorenzo / flutter_appavailability

A Flutter plugin that allows you to check if an app is installed/enabled, launch an app and get the list of installed apps.
https://pub.dartlang.org/packages/flutter_appavailability
MIT License
92 stars 89 forks source link

Unable to build release #12

Open ghost opened 4 years ago

ghost commented 4 years ago

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.

while-loop commented 4 years ago

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"
xni06 commented 4 years ago

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"
jeroen-meijer commented 4 years ago

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 commented 4 years ago

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

pankti16 commented 4 years ago

Same issue.

eltonmorais commented 4 years ago

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

BrutalCoding commented 3 years ago

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 👍