Flutter Build APK:执行任务':speech_recognition:verifyReleaseResources'

问题描述 投票:3回答:1

大家。我在flutter中将apk作为发行方法存在一些问题。我真的不知道为什么这有错误。这是指https://github.com/rxlabz/speech_recognition/tree/master/example

在作为发布方法构建期间,出现了以下问题。

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         
android flutter build speech-recognition release
1个回答
0
投票

我知道,答案可能为时已晚,但是无论如何,这是一个令人讨厌的问题-我现在遇到了同样的问题,并花了几个小时来解决它。

最后,解决方法是在lib的Android文件夹中的build.gradle中将“ compileSdkVersion”属性从25手动更改为28,之后我设法编译了该项目。

© www.soinside.com 2019 - 2024. All rights reserved.