regulaforensics / flutter_face_api

MIT License
31 stars 14 forks source link

Build a flutter app with v3.2.3 in release mode is impossible #5

Open befirst opened 2 years ago

befirst commented 2 years ago

Before Submitting, be sure to

Bug Description A Flutter app with the last version (3.2.3) of the plugin can't be built in release mode;

Steps To Reproduce

  1. Include the flutter_face_api: ^3.2.1 or install the 3.2.3 version and go to step 3;
  2. flutter pub upgrade to install the last new version which installs the 3.2.3;
  3. flutter run --release;
  4. See error:
    /Users/{username}/.gradle/caches/transforms-2/files-2.1/5e4480e6f8bb0d0e95b106312e979cc6/api-
    3.2.1688/res/values/values.xml:37:5-39:13: AAPT: error: style attribute 'android:attr/forceDarkAllowed' not found.

Expected behavior The app is built successfully

Environment:

Possible solution for those who came across the same use flutter_face_api: 3.2.1 without ^;

Possible solution for developers of the plugin

  1. increase the compileSdkVersion to 29 inside the plugin;
  2. use values-v29 folder for the SDK v3.2.1688 which will have inside the next:
    ...
    <style name="FaceSdkTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
        <item name="android:forceDarkAllowed" ns1:targetApi="q">false</item>
    </style>
    ...
vyakimchik commented 2 years ago

Hi @befirst! Thanks for your detailed description of the issue. We'll fix it.

vyakimchik commented 1 year ago

Hi @befirst! Please have a look at the latest release version - this error shouldn't happen anymore.