FAILURE: Build failed with an exception. * What went wrong: Execution failed for task

升级到flutter 1.12后,尝试flutter build apk --release build 一个apk包出来

然而报如下错误:

FAILURE: Build failed with an exception.

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

     C:\Users\Administrator\.gradle\caches\transforms-2\files-2.1\a9c96bd680f706d3c9af22cf8b972513\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 1m 52s

看起来很吓人,然而,找到关键影响因素就好了,看这行

Execution failed for task ':sms:verifyReleaseResources'.

看来有可能和这个“sms”有关

这个sms自动18年9月就没有再更新过了

附链接:https://pub.dev/packages/sms/versions

移除对于sms的依赖,直接用自己的插件替换相应功能。。。

问题解决。。。

发布了371 篇原创文章 · 获赞 32 · 访问量 24万+

猜你喜欢

转载自blog.csdn.net/perfectnihil/article/details/103558672