添加cordova-plugin-file-opener2後,打包出錯
阿新 • • 發佈:2019-01-07
not found 1.0 log ORC div ack ren and bug 原文:添加cordova-plugin-file-opener2後,打包出錯
> 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 7s
(node:7000) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): Error: cmd: Command failed with exit code 1 Error output:
C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\support-compat-28.0
.0-alpha1.aar\958f18514ef6665a8a428677fe3825c9\res\values\values.xml:20:5-70: AA
PT: error: resource android:attr/fontVariationSettings not found.
C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\support-compat-28.0
.0-alpha1.aar\958f18514ef6665a8a428677fe3825c9\res\values\values.xml:20:5-70: AA
PT: error: resource android:attr/ttcIndex not found.
D:\cordova\workspace\bbb\platforms\android\app\build\intermediates\incremental\m
ergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr
/fontVariationSettings not found.
D:\cordova\workspace\bbb\platforms\android\app\build\intermediates\incremental\m
ergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr
/ttcIndex not found.
報錯如下:
* 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 7s
(node:7000) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): Error: cmd: Command failed with exit code 1 Error output:
C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\support-compat-28.0
.0-alpha1.aar\958f18514ef6665a8a428677fe3825c9\res\values\values.xml:20:5-70: AA
PT: error: resource android:attr/fontVariationSettings not found.
C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\support-compat-28.0
.0-alpha1.aar\958f18514ef6665a8a428677fe3825c9\res\values\values.xml:20:5-70: AA
PT: error: resource android:attr/ttcIndex not found.
D:\cordova\workspace\bbb\platforms\android\app\build\intermediates\incremental\m
ergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr
/fontVariationSettings not found.
D:\cordova\workspace\bbb\platforms\android\app\build\intermediates\incremental\m
ergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr
/ttcIndex not found.
error: failed linking references.
此問題基本是grade版本沖突問題,本人找到的解決方法是,在打包目錄下與**\platforms\android\app,在與build.gradle同一級目錄下,創建文件,名稱為build-extras.gradle,內容為
configurations.all {
? ? resolutionStrategy {
? ? ? ? force ‘com.android.support:support-v4:27.1.0‘
? ? }
}
添加cordova-plugin-file-opener2後,打包出錯