使用ionic打包的环境突然不能打出包了
报错信息:
Error:Execution failed for task ':app:processDebugResources'
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --
debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4m 18s
(node:9516) [DEP0018] DeprecationWarning: Unhandled promise rejections are
deprecated. In the future, promise rejections that are not handled will
terminate the Node.js process with a non-zero exit code.
resource android:attr/dialogCornerRadius not found.
环境:
node: 10.14.1
ionic: 3.19.1
cordova: 8.0.0
gradle: 4.1
在谷歌上找了很多方法不管用,环境也重新装了好几次都不管用
然后参考度娘上这篇文章
http://www.voidcn.com/article/p-ryafzcje-bsc.html
发现cordova目前不支持android-28,于是在引入的插件里找到一个cordova.plugins.diagnostic插件的plugin.xml里面有
<preference name="ANDROID_SUPPORT_VERSION" default="28.+" />
<framework src="com.android.support:support-v4:$ANDROID_SUPPORT_VERSION" />
<framework src="com.android.support:appcompat-v7:$ANDROID_SUPPORT_VERSION" />
然后直接把28改成26,再打包就成功了。