Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否支持cordova-android 7.0以上 #8

Closed
fff89 opened this issue Mar 21, 2018 · 12 comments
Closed

是否支持cordova-android 7.0以上 #8

fff89 opened this issue Mar 21, 2018 · 12 comments

Comments

@fff89
Copy link

fff89 commented Mar 21, 2018

您好

使用您的插件,发现使用cordova-android@7.0,以上

用6.4.0可以的

编译的时候提示错误,

`cp: copyFileSync: could not write to dest file (code=ENOENT):E:\tmp\hello\platforms\android\res\xml\config.xml

Parsing E:\tmp\hello\platforms\android\res\xml\config.xml failed
(node:144) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open 'E:\tmp\hello\platforms\android\res\xml\config.xml'
(node:144) [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.`

@fff89
Copy link
Author

fff89 commented Mar 22, 2018

image

@zsxsoft
Copy link
Owner

zsxsoft commented Mar 23, 2018

这我感觉你不装这个插件也会出现failed问题啊

@fff89
Copy link
Author

fff89 commented Mar 23, 2018

添加file插件,是可以的,其他插件没有尝试
image

@zsxsoft
Copy link
Owner

zsxsoft commented Mar 23, 2018

抱歉看错了,我的项目是6……

我看了一下update log,确实有需要改的……
我看看把

@zsxsoft
Copy link
Owner

zsxsoft commented Mar 23, 2018

我看了一下,不少插件都受到了影响,可能不太好处理,回头看看

ionic-team/ionic-plugin-keyboard#304
storesafe/cordova-sqlite-storage#729

@zsxsoft
Copy link
Owner

zsxsoft commented Mar 23, 2018

image

俩版本路径改了,这个我看看plugin.xml怎么写,你可以手动改plugin.xml先用着

@fff89
Copy link
Author

fff89 commented Mar 23, 2018

恩恩,非常感谢

因为默认添加,android的就是7.0了,所以直接使用您的插件,就会编译出错。

看来用6没事就好,

您的命令行工具正好看,是什么工具哇

@zsxsoft
Copy link
Owner

zsxsoft commented Mar 23, 2018

deepin-terminal, 配的oh-my-zsh

我正在看怎么保证和6的兼容性,直接改的话我的应用跑不动。。

@zsxsoft
Copy link
Owner

zsxsoft commented Mar 23, 2018

研究了下,如果直接按照cordova-android@7的指示改,会导致旧版本不兼容。
根据此Commit,我尝试修改代码:
https://github.com/apache/cordova-common/blob/fe21952b492dd9f90b7de07c256064626cdb8d5b/src/ConfigChanges/ConfigFile.js#L193

image

于是报错
image

初步怀疑Cordova内部的实现存在精神分裂,需要debug进Cordova解决,或者像Crosswalk那样写个Hook。

没有太仔细看,建议还是使用cordova-android 6.4.0吧,

跟踪以下插件的最新动态:
EddyVerbruggen/Custom-URL-scheme#264
jeduan/cordova-plugin-facebook4#601

@Wzhex
Copy link

Wzhex commented Oct 13, 2018

image

如上图修改即可

@zsxsoft
Copy link
Owner

zsxsoft commented Oct 14, 2018

@Wzhex thanks, 我会在有空的时候研究并测试

@zsxsoft
Copy link
Owner

zsxsoft commented Oct 22, 2018

为兼容Cordova@6.4,不能使用如上改法。现最新Commit已修复,并已配置好CI测试。我将在实际测试之后,向npm发布新版。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants