鍍金池/ 問答/HTML5  HTML/ ionic cordova build android 報錯

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
回答
編輯回答
耍太極

應該是你使用promise的問題,推測是沒有寫catch。

2017年3月23日 20:50
編輯回答
朕略傻

找到問題的解決辦法了 鏈接描述

該問題的主要描述應該是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
這兩種錯誤
附上解決辦法:
圖片描述

2017年11月12日 18:17
編輯回答
亮瞎她

是不是沒有安裝gradle和沒有配置gradle

2018年7月2日 02:24