添加cordova-plugin-file-opener2后,打包出错

报错如下:

* 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,

build-extras.gradle下载地址为https://download.csdn.net/download/qq_41082640/10447481

 

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页