包含Cordova插件文件的Ionion-on中的Android构建错误
在我的项目中使用cordova插件“file”和“file-opener2”时出现以下错误。移除插件后,它会生成一个合适的android版本 我还尝试将cordova版本设置为7.1.0,cordova平台android版本设置为6.4.0。 尽管错误不同,但构建仍然失败包含Cordova插件文件的Ionion-on中的Android构建错误,android,ionic-framework,ionic3,cordova-plugins,cordova-android,Android,Ionic Framework,Ionic3,Cordova Plugins,Cordova Android,在我的项目中使用cordova插件“file”和“file-opener2”时出现以下错误。移除插件后,它会生成一个合适的android版本 我还尝试将cordova版本设置为7.1.0,cordova平台android版本设置为6.4.0。 尽管错误不同,但构建仍然失败 * Wh at went wrong: Execution failed for task ':app:processDebugResources'. > Failed to execute aapt * Try: R
* Wh
at 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 2s
at ChildProcess.whenDone (/Users/Naresh/Documents/AnshFertilityApp/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at ChildProcess.emit (events.js:180:13)
at maybeClose (internal/child_process.js:936:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
(node:99591) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:99591) [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.
我当前的爱奥尼亚信息:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.9
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Node : v9.8.0
npm : 5.6.0
OS : macOS High Sierra
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
我安装了这个插件,效果很好: 更换
<framework src="com.android.support:support-v4:+" />
到
在cordova.plugins.fileOpener2
的plugin.xml
中。并删除android平台ionic cordova平台rm android,然后再次添加ionic cordova平台添加android
<framework src="com.android.support:support-v4:24.1.1+" />