1

I get this when I do 'flutter run --release'

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':unique_identifier:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\USER\.gradle\caches\transforms-2\files-2.1\df6cf23cc51da578d8b158de17d0c9cb\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.

     C:\Users\USER\.gradle\caches\transforms-2\files-2.1\df6cf23cc51da578d8b158de17d0c9cb\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 19s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                      19.7s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin camera...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done                    1.7s
√ Built build\app\outputs\repo.
Building plugin cloud_firestore...
The plugin cloud_firestore could not be built due to the issue above.

When I do flutter run --debug I don't get this issue,

Any idea how to solve it?

I tried down grading cloud_firestore to 0.12.11 and 0.12.10+2 but it didn't help

I tried:

    minSdkVersion 29
    targetSdkVersion 29

it didn't help

I checked the file: C:\Users\USER\.gradle\caches\transforms-2\files-2.1\df6cf23cc51da578d8b158de17d0c9cb\core-1.0.0\res\values\values.xml and indeed the 2 mentioned items are missing, I try to add them manually but it is deleted when I run flutter run --release

1 Answer 1

2

Solution:

After I did flutter run --release --verbose, I realize that unique_identifier was refering to the package unique_identifier that I have in my YAML file but not actually uses in the project.

So I removed unique_identifier and the build passed.

The message about cloud_firestore confused me, and is not really related.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much, this saved me after all trying to resolve this the whole day. I had to remove the unique_identifier and use AndroidDeviceInfo and IosDeviceInfo instead

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.