ionic2 打包时报错 file-opener2

在app自动更新过程当中,有用到ionic-native插件:cordova-plugin-file-openner2    添加插件后,打包时有错:android

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find any version that matches com.android.support:support-v4:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml
https://repo1.maven.org/maven2/com/android/support/support-v4/
Required by:
:android:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

经过一番查询,多是插件版本问题;app

在这儿发现了解决办法-------->maven

http://stackoverflow.com/questions/42087247/phonegap-android-build-error-old-versions-and-pluginsionic


好,因而就在 config.xml中作了以下更改:ui

改以前:spa

<plugin name="cordova-plugin-file-opener2" spec="~2.0.15" />
改以后(若是没有就添加打包的时候 项目会自动添加):
<plugin name="cordova-plugin-file-opener2" spec="1.0.11" />
好吧----这就能够用了 打包成功!!

 总结:本身太菜!插件

相关文章
相关标签/搜索