错误信息:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':xxx:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
> Android resource linking failed
ERROR:/Users/xxx/xxx/xxx/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.
所安装插件和当前项目 compileSdkVersion
不一致导致。如果你用的是 Android Studio ,左边项目文件区选择 External Libraries-Flutter Plugins
,找到报错的插件,修改其 compileSdkVersion
和当前项目一致即可。
也可以找到插件的实际路径修改,插件实际安装路径:~/.pub-cache/hosted/pub.flutter-io.cn/
,也有可能不是 pub.flutter-io.cn
,看自己怎么配置的。
参考:
Execution failed for task ':xxxxxx:verifyReleaseResources'
flutter 打包 Execution failed for task ':xxx:verifyReleaseResources'. > A failure occurred