ionic cordova build android 报错

FAILURE: Build failed wit
h an exception.

* What went wrong:
Execution failed for task ':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 2s
(node:19948) [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.

图片描述

已经试过remove android add android的操作,还有也更新了Android SDK Build-Tools,都不行

问题补充:为了其他人能找到答案,补充完整问题描述
ionic cordova build android 报错

AAPT: error: resource android:attr/fontVariationSettings not found
AAPT: error: resource android:attr/ttcIndex not found.

Execution failed for task ':processDebugResources'.>Failed to execute aapt

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
阅读 3.6k
3 个回答

找到问题的解决办法了 链接描述

该问题的主要描述应该是ionic cordova build android 报
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
这两种错误
附上解决办法:
图片描述

是不是没有安装gradle和没有配置gradle

应该是你使用promise的问题,推测是没有写catch。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进