ionic2 打包时报错 file-opener2

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ionic2 打包时报错 file-opener2相关的知识,希望对你有一定的参考价值。

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

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.

通过一番查询,可能是插件版本问题;

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

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


好,于是就在 config.xml中做了如下更改:

改之前:

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

 总结:自己太菜!

以上是关于ionic2 打包时报错 file-opener2的主要内容,如果未能解决你的问题,请参考以下文章

springCloud多模块打包时报错问题

打包新版本上传到AppStore时报错 ERROR ITMS-90034:

hive udaf 用maven打包运行create temporary function 时报错

打包python为可执行文件时报错R6034解决方案

jar在集群上运行时报错:classnotfindexception

2021-9-4 JDK11 maven打包时报错multiple points等等