runner525 / x5webview-cordova-plugin

x5webview for cordova
Apache License 2.0
114 stars 49 forks source link

android 7.0.0 添加后报错 cp: copyFileSync: could not write to dest file (code=ENOENT):/platforms/android/res/xml/config.xml #19

Open Jiufuqiangdan opened 6 years ago

Jiufuqiangdan commented 6 years ago

android 7.0.0 添加后报错 cp: copyFileSync: could not write to dest file (code=ENOENT):/platforms/android/res/xml/config.xml

Jiufuqiangdan commented 6 years ago

cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/lofze/UI/ionic/sweep/platforms/android/res/xml/config.xml

Parsing /Users/lofze/UI/ionic/sweep/platforms/android/res/xml/config.xml failed (node:14708) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/Users/lofze/UI/ionic/sweep/platforms/android/res/xml/config.xml' (node:14708) [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.

请问如何处理

jackyzonewen commented 6 years ago

? 碰到了同样的问题,请问怎么解决

lejun commented 6 years ago

cordova(8.0.0)版本添加x5插件会在 项目\platforms\android 下生成一个 libs 文件,需要将这个 libs 剪切到 app

(应该是执行 cordova build android时,会检测android原生工程的目录结构,判断是否是android studio的目录结构)。 https://github.com/apache/cordova-android/blob/6abd6d6b477966d6a40420800376d28bacd1d940/bin/templates/cordova/Api.js#L82

ssbunny commented 6 years ago

plugin.xml 里的 source-file 改为 :

<lib-file src="platforms/android/libs/tbs_sdk_thirdapp_v3.1.0.1034_43100_sharewithdownload_obfs_20170301_182143.jar"/>
<lib-file src="platforms/android/libs/armeabi/liblbs.so" />