Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Build APK: Execution failed for task ':speech_recognition:verifyReleaseResources'

everybody. I have some issues with build apk as release method in flutter. I don't really know why this has error. This refers https://github.com/rxlabz/speech_recognition/tree/master/example

During building as release method, issues are following.

FAILURE: Build failed with an exception.                                                                           

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

     /Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/font not found.

     /Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontWeight not found.

     /Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/core-1.0.0/res/values/values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.

     /Users/kk/.gradle/caches/transforms-2/files-2.1/0a271e99b6771ad4a84318244d532fb7/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 3m 45s         
like image 567
Wang LiYang Avatar asked Oct 28 '22 05:10

Wang LiYang


1 Answers

I know, the answer might be too late, but anyway, this is annoying issue - I've got the same problem now and spent couple of hours fighting it.

Finally the workaround was to manually change in the build.gradle in the Android folder of the lib the "compileSdkVersion" property from 25 to 28, after that I managed to compile the project.

like image 156
Fellow7000 Avatar answered Nov 09 '22 08:11

Fellow7000