Phonegap文件传输插件导致Android构建失败 [英] Phonegap file transfer plugin causing the Android build to fail

查看:72
本文介绍了Phonegap文件传输插件导致Android构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Phonegap/Cordova的移动应用程序,正在使用文件传输插件从照片库上传照片.

I'm working on a mobile application for using Phonegap/Cordova, I'm using the file transfer plugin to upload photos from the photo library.

iOS版本取得了成功,而Android版本却给了我一个错误.

The iOS build was a success, while the Android build is giving me an error.

我不确定是什么原因导致构建失败以及如何防止该失败.

I'm not sure what's causing the build to fail and how to prevent that failure.

这是构建日志: http://freetexthost.com/orbg5lm0en

推荐答案

cordova-plugin-file-transfer具有cordova-plugin-file 5.0.0的依赖项,该依赖项与您的cordova-android版本不兼容,它需要cordova-android 6.3.0或更高版本.因此,您有两种选择:

cordova-plugin-file-transfer has a dependency for cordova-plugin-file 5.0.0, which is not compatible with your cordova-android version, it requires cordova-android 6.3.0 or newer. So you have two options:

  1. 更新您的cordova-android 6.3.0或更高版本(我建议6.4.0)
  2. cordova-plugin-file-transfer降级至1.6.3,因为cordova-plugin-file的依赖项将降为应该与您当前平台兼容的旧版插件
  1. Update your cordova-android 6.3.0 or newer (I would recommend 6.4.0)
  2. Downgrade cordova-plugin-file-transfer to 1.6.3 as the dependency for cordova-plugin-file will be to an older version of the plugin that should work with your current platform

要更新cordova-android,您必须删除并重新添加它(请注意,如果您对项目进行了一些手动更改,将会丢失它)

To update cordova-android you have to remove and re add it (beware that if you made some manual change on the project you will lose it)

cordova platform rm android
cordova platform add android@6.4.0

要降级插件,还必须先将其删除

To downgrade the plugin you also have to remove it first

cordova plugin rm cordova-plugin-file-transfer
cordova plugin add cordova-plugin-file-transfer@1.6.3

这篇关于Phonegap文件传输插件导致Android构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆