PHP技术,网站开发,PHP,PHP学习,Python学习,人工智能,大数据服务

PHP+Python » 前端设计 » cordova打开文件插件,cordova-plugin-file-opener2

cordova打开文件插件,cordova-plugin-file-opener2

此文被围观873日期: 2018-10-08 分类 : 前端设计  标签:  ··

如何用:cordova plugin add cordova-plugin-file-opener2

可能会出现如下错误:

com.android.ide.common.process.ProcessException: Failed to execute aapt at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796) at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551) at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)


建议使用:cordova plugin add https://github.com/JuanjoPP/cordova-plugin-file-opener2


使用方法:

var target="/sdcard/Download/ionic.apk"; 

cordova.plugins.fileOpener2.open(target, 'application/vnd.android.package-archive');


参考:

https://www.cnblogs.com/liaolei1/p/7639844.html

https://github.com/pwlin/cordova-plugin-file-opener2/issues/202



© Copyright 2011-2019 adophper.com. All Rights Reserved.
读图网科技 版权所有。蜀ICP备12031064号