起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5972|回复: 10

[处理中1] 刚学wex5,打包失败

[复制链接]

2

主题

9

帖子

35

积分

新手上路

Rank: 1

积分
35
QQ
发表于 2016-9-12 10:49:48 | 显示全部楼层 |阅读模式
框架:WeX5  
版本:3.5
问题:打包失败

描述:运行正常,但打包失败。在主页里定义了:var ShellImpl = require('$UI/system/lib/portal/shellImpl'); 。
我需要问:怎么处理?

开始......
   
保存配置信息:
   
编译UI资源:
   
清除编译环境:
   
复制模版工程:
   
复制工程:
   
复制插件:
   
复制WWW资源:
   
更新工程信息:
   
增加插件:
   使用到的插件: [cordova-plugin-whitelist, cordova-plugin-splashscreen, cordova-plugin-app-preferences, com.justep.cordova.plugin.app.utils, cordova-plugin-x-toast, cordova-plugin-inappbrowser, org.apache.cordova.device, cordova-plugin-app-version]
   开始安装插件......
****ERROR****: 子任务 "addPlugins" 执行失败。
****ERROR****: 任务 "addPlugins" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: java.io.FileNotFoundException: D:\WeX5_V3.5\model\Native\plugins\org.apache.cordova.device\plugin.xml (系统找不到指定的路径。)
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html

1

主题

3232

帖子

1174

积分

金牌会员

Rank: 6Rank: 6

积分
1174
QQ
发表于 2016-9-12 15:19:06 | 显示全部楼层
添加插件失败,你也没用到什么插件啊,他说你有个 插件文件 xml没找到,不过应该不是这个问题,你随便打包一个平台自带的APP 看一下 会不会报错
在问题解决后,希望大家可以吧解决方法也分享一下,这样可以让更多的X5开发者共同进步,谢谢大家的知识共享
回复 支持 反对

使用道具 举报

2

主题

9

帖子

35

积分

新手上路

Rank: 1

积分
35
QQ
 楼主| 发表于 2016-9-12 17:25:39 | 显示全部楼层
打包了takeoutadmin,没什么问题。
开始......
   
保存配置信息:
   
编译UI资源:
   
清除编译环境:
   
复制模版工程:
   
复制工程:
   
复制插件:
   
复制WWW资源:
   
更新工程信息:
   
增加插件:
   使用到的插件: [cordova-plugin-whitelist, cordova-plugin-splashscreen, cordova-plugin-app-preferences, com.justep.cordova.plugin.app.utils, cordova-plugin-x-toast, cordova-plugin-inappbrowser, cordova-plugin-app-version, cordova-plugin-file, ch.ti8m.documenthandler, cordova-plugin-file-transfer]
   开始安装插件......
   开始准备插件参数......
   插件 "cordova-plugin-splashscreen" 参数如下:
   插件 "cordova-plugin-app-preferences" 参数如下:
   插件 "cordova-plugin-file" 参数如下:
   插件 "cordova-plugin-file-transfer" 参数如下:
   插件 "cordova-plugin-network-information" 参数如下:
   插件 "cordova-plugin-zip" 参数如下:
   插件 "cordova-plugin-inappbrowser" 参数如下:
   插件 "cordova-plugin-x-toast" 参数如下:
   插件 "com.justep.cordova.plugin.app.utils" 参数如下:
   插件 "cordova-plugin-app-version" 参数如下:
   插件 "ch.ti8m.documenthandler" 参数如下:
   插件参数准备完成
   Installing "cordova-plugin-splashscreen" for android
   Installing "cordova-plugin-splashscreen" for ios
   Installing "cordova-plugin-app-preferences" for android
   Installing "cordova-plugin-app-preferences" for ios
   Installing "cordova-plugin-file" for android
   Installing "cordova-plugin-file" for ios
   Installing "cordova-plugin-file-transfer" for android
   Dependent plugin "cordova-plugin-file" already installed on android.
   Installing "cordova-plugin-file-transfer" for ios
   Dependent plugin "cordova-plugin-file" already installed on ios.
   Installing "cordova-plugin-network-information" for android
   Installing "cordova-plugin-network-information" for ios
   Installing "cordova-plugin-zip" for android
   Dependent plugin "cordova-plugin-file" already installed on android.
   Installing "cordova-plugin-zip" for ios
   Dependent plugin "cordova-plugin-file" already installed on ios.
   Installing "cordova-plugin-inappbrowser" for android
   Installing "cordova-plugin-inappbrowser" for ios
   Installing "cordova-plugin-x-toast" for android
   Installing "cordova-plugin-x-toast" for ios
   Installing "com.justep.cordova.plugin.app.utils" for android
   Dependent plugin "cordova-plugin-file" already installed on android.
   Dependent plugin "cordova-plugin-file-transfer" already installed on android.
   Dependent plugin "cordova-plugin-network-information" already installed on android.
   Dependent plugin "cordova-plugin-zip" already installed on android.
   Dependent plugin "cordova-plugin-inappbrowser" already installed on android.
   Dependent plugin "cordova-plugin-x-toast" already installed on android.
   Installing "com.justep.cordova.plugin.app.utils" for ios
   Dependent plugin "cordova-plugin-file" already installed on ios.
   Dependent plugin "cordova-plugin-file-transfer" already installed on ios.
   Dependent plugin "cordova-plugin-network-information" already installed on ios.
   Dependent plugin "cordova-plugin-zip" already installed on ios.
   Dependent plugin "cordova-plugin-inappbrowser" already installed on ios.
   Dependent plugin "cordova-plugin-x-toast" already installed on ios.
   Installing "cordova-plugin-app-version" for android
   Installing "cordova-plugin-app-version" for ios
   Installing "ch.ti8m.documenthandler" for android
   Installing "ch.ti8m.documenthandler" for ios
   插件安装完成
   
创建源代码工程:
   
android应用环境准备:
   
ios应用环境准备:
   
生成android应用包:
   Running command: cmd "/s /c "D:\WeX5_V3.5\model\Native\takeoutadmin\build\src\platforms\android\cordova\build.bat --release --gradleArg=--offline""
   ANDROID_HOME=D:\WeX5_V3.5\tools\adt-sdk
   JAVA_HOME=D:\WeX5_V3.5\java\jre1.8
   Running: D:\WeX5_V3.5\model\Native\takeoutadmin\build\src\platforms\android\gradlew cdvBuildRelease -b D:\WeX5_V3.5\model\Native\takeoutadmin\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline
   Starting a new Gradle Daemon for this build (subsequent builds will be faster).
   Incremental java compilation is an incubating feature.
   :preBuild UP-TO-DATE
   :preReleaseBuild UP-TO-DATE
   :checkReleaseManifest
   :CordovaLib:preBuild UP-TO-DATE
   :CordovaLib:preReleaseBuild UP-TO-DATE
   :CordovaLib:compileReleaseNdk UP-TO-DATE
   :CordovaLib:compileLint
   :CordovaLib:copyReleaseLint UP-TO-DATE
   :CordovaLib:checkReleaseManifest
   :CordovaLib:preDebugAndroidTestBuild UP-TO-DATE
   :CordovaLib:preDebugBuild UP-TO-DATE
   :CordovaLib:preDebugUnitTestBuild UP-TO-DATE
   :CordovaLib:preReleaseUnitTestBuild UP-TO-DATE
   :JustepGetContent:preBuild UP-TO-DATE
   :JustepGetContent:preReleaseBuild UP-TO-DATE
   :JustepGetContent:compileReleaseNdk UP-TO-DATE
   :JustepGetContent:compileLint
   :JustepGetContent:copyReleaseLint UP-TO-DATE
   :JustepGetContent:checkReleaseManifest
   :JustepGetContent:preDebugAndroidTestBuild UP-TO-DATE
   :JustepGetContent:preDebugBuild UP-TO-DATE
   :JustepGetContent:preDebugUnitTestBuild UP-TO-DATE
   :JustepGetContent:preReleaseUnitTestBuild UP-TO-DATE
   :JustepGetContent:prepareComAndroidSupportAppcompatV72220Library
   :JustepGetContent:prepareComAndroidSupportSupportV42220Library
   :JustepGetContent:prepareReleaseDependencies
   :JustepGetContent:compileReleaseAidl
   :JustepGetContent:compileReleaseRenderscript
   :JustepGetContent:generateReleaseBuildConfig
   :JustepGetContent:generateReleaseAssets UP-TO-DATE
   :JustepGetContent:mergeReleaseAssets
   :JustepGetContent:generateReleaseResValues
   :JustepGetContent:generateReleaseResources
   :JustepGetContent:mergeReleaseResources
   :JustepGetContent:processReleaseManifest
   :JustepGetContent:processReleaseResources
   :JustepGetContent:generateReleaseSources
   注: 某些输入文件使用或覆盖了已过时的 API。
   注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
   注: D:\WeX5_V3.5\model\Native\takeoutadmin\build\src\platforms\android\JustepGetContent\src\main\java\com\justep\x5\support\chooser\FileUploadChooserActivity.java使用了未经检查或不安全的操作。
   注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
   :JustepGetContent:compileReleaseJavaWithJavac
   :JustepGetContent:extractReleaseAnnotations
   :JustepGetContent:mergeReleaseProguardFiles
   :JustepGetContent:packageReleaseRenderscript UP-TO-DATE
   :JustepGetContent:packageReleaseResources
   :JustepGetContent:processReleaseJavaRes UP-TO-DATE
   :JustepGetContent:transformResourcesWithMergeJavaResForRelease
   :JustepGetContent:transformClassesAndResourcesWithSyncLibJarsForRelease
   :JustepGetContent:mergeReleaseJniLibFolders
   :JustepGetContent:transformNative_libsWithMergeJniLibsForRelease
   :JustepGetContent:transformNative_libsWithSyncJniLibsForRelease
   :JustepGetContent:bundleRelease
   :CordovaLib:prepareAndroidJustepGetContentUnspecifiedLibrary
   :CordovaLib:prepareComAndroidSupportAppcompatV72220Library
   :CordovaLib:prepareComAndroidSupportSupportV42220Library
   :CordovaLib:prepareReleaseDependencies
   :CordovaLib:compileReleaseAidl
   :CordovaLib:compileReleaseRenderscript
   :CordovaLib:generateReleaseBuildConfig
   :CordovaLib:generateReleaseAssets UP-TO-DATE
   :CordovaLib:mergeReleaseAssets
   :CordovaLib:generateReleaseResValues
   :CordovaLib:generateReleaseResources
   :CordovaLib:mergeReleaseResources
   :CordovaLib:processReleaseManifest
   :CordovaLib:processReleaseResources
   :CordovaLib:generateReleaseSources
   注: 某些输入文件使用或覆盖了已过时的 API。
   注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
   :CordovaLib:compileReleaseJavaWithJavac
   :CordovaLib:extractReleaseAnnotations
   :CordovaLib:mergeReleaseProguardFiles
   :CordovaLib:packageReleaseRenderscript UP-TO-DATE
   :CordovaLib:packageReleaseResources
............
   :mergeReleaseResources
   :processReleaseManifest
   注: 某些输入文件使用或覆盖了已过时的 API。
   注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
   注: 某些输入文件使用了未经检查或不安全的操作。
   注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
   :compileReleaseJavaWithJavac
   :compileReleaseNdk UP-TO-DATE
   :compileReleaseSources
   :lintVitalRelease
   :prePackageMarkerForRelease
   :transformClassesWithDexForRelease
   :mergeReleaseJniLibFolders
   :transformNative_libsWithMergeJniLibsForRelease
   :processReleaseJavaRes UP-TO-DATE
   :transformResourcesWithMergeJavaResForRelease
   :validateReleaseSigning
   :packageRelease
   :zipalignRelease
   :assembleRelease
   :cdvBuildRelease
   
   BUILD SUCCESSFUL
   
   Total time: 1 mins 6.115 secs
   Built the following apk(s):
       D:\WeX5_V3.5\model\Native\takeoutadmin\build\src\platforms\android\build\outputs\apk\android-release.apk
   
生成ios应用包:
   
发布版本更新文件:
   发布版本更新文件......
   
完成。


我和程序包里用到 “ localStorage.getItem('pw')” ;与“localStorage.setItem('pw',userData.val('PASSWORD'));”  是不是有关系?
回复 支持 反对

使用道具 举报

1

主题

3232

帖子

1174

积分

金牌会员

Rank: 6Rank: 6

积分
1174
QQ
发表于 2016-9-12 17:32:38 | 显示全部楼层
这个没问题,这是一段JS代码,前端不报错,就没问题
在问题解决后,希望大家可以吧解决方法也分享一下,这样可以让更多的X5开发者共同进步,谢谢大家的知识共享
回复 支持 反对

使用道具 举报

2

主题

9

帖子

35

积分

新手上路

Rank: 1

积分
35
QQ
 楼主| 发表于 2016-9-12 19:19:18 | 显示全部楼层
本帖最后由 redincloud 于 2016-9-15 11:49 编辑

我将代码复制出来,帮多看下,谢谢:
源码:
<?xml version="1.0" encoding="utf-8"?>

<div xmlns="http://www.w3.org/1999/xhtml" xid="window" class="window" component="$UI/system/components/justep/window/window"
  design="device:m;">  
  <div component="$UI/system/components/justep/model/model" xid="model" style="height:auto;top:259px;left:104px;">
    <div component="$UI/system/components/justep/data/baasData" autoLoad="true"
      xid="userData" queryAction="queryUSERSTABLE" saveAction="saveUSERSTABLE" url="/station/station" tableName="USERSTABLE" idColumn="USERNAME">
  

回复 支持 反对

使用道具 举报

2

主题

9

帖子

35

积分

新手上路

Rank: 1

积分
35
QQ
 楼主| 发表于 2016-9-12 19:20:03 | 显示全部楼层
本帖最后由 redincloud 于 2016-9-15 11:53 编辑

JS:

复制代码

define(function(require){
        var $ = require("jquery");
        var justep = require("$UI/system/lib/justep");
//   require("cordova!org.cordova.plugin.device");
回复 支持 反对

使用道具 举报

2

主题

9

帖子

35

积分

新手上路

Rank: 1

积分
35
QQ
 楼主| 发表于 2016-9-12 19:22:16 | 显示全部楼层
分单页打包,其他页面都通过了,就是这个页面通不过。提示错误,高手帮我诊断下,谢谢。
回复 支持 反对

使用道具 举报

1

主题

3232

帖子

1174

积分

金牌会员

Rank: 6Rank: 6

积分
1174
QQ
发表于 2016-9-13 10:19:57 | 显示全部楼层
redincloud 发表于 2016-9-12 19:22
分单页打包,其他页面都通过了,就是这个页面通不过。提示错误,高手帮我诊断下,谢谢。 ...

就是包一开始那个错误?看着代码你也没有用到任何插件啊,就是一个普通的登录功能的JS,这个页面在浏览器可以顺利运行?
在问题解决后,希望大家可以吧解决方法也分享一下,这样可以让更多的X5开发者共同进步,谢谢大家的知识共享
回复 支持 反对

使用道具 举报

0

主题

79

帖子

325

积分

中级会员

Rank: 3Rank: 3

积分
325
QQ
发表于 2016-9-13 10:26:20 | 显示全部楼层
错误信息: java.io.FileNotFoundException: D:\WeX5_V3.5\model\Native\plugins\org.apache.cordova.device\plugin.xml (系统找不到指定的路径。)

---  插件引用的是旧版名称,请检查代码中require的插件名称,改为新的   cordova-plugin-device
回复 支持 反对

使用道具 举报

2

主题

9

帖子

35

积分

新手上路

Rank: 1

积分
35
QQ
 楼主| 发表于 2016-9-13 23:52:15 | 显示全部楼层
代码在上面,我没有要引用这个插件,为什么会报这个错?或者我的代码那里有引用到这插件?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-6 05:20 , Processed in 0.063742 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表