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

QQ登录

只需一步,快速开始

查看: 2359|回复: 7

[结贴] 更新了Wex5 v3.7后,打包android app包出错 Win7环境

[复制链接]

21

主题

71

帖子

189

积分

初级会员

Rank: 2

积分
189
QQ
发表于 2017-8-7 17:20:23 | 显示全部楼层 |阅读模式
生成android应用包:
      -----platforms: android context.hook: after_prepare
      Running command: cmd "/s /c "C:\Users\Baocheng\Desktop\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\cordova\build.bat --release --gradleArg=--offline""
      ANDROID_HOME=C:\Users\Baocheng\Desktop\WeX5_V3.7\tools\adt-sdk
      JAVA_HOME=C:\Users\Baocheng\Desktop\WeX5_V3.7\java\jre1.8
      Running: C:\Users\Baocheng\Desktop\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\gradlew cdvBuildRelease -b C:\Users\Baocheng\Desktop\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline
      NDK is missing a "platforms" directory.
      If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\Users\Baocheng\Desktop\WeX5_V3.7\tools\adt-sdk\ndk-bundle.
      If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
      
      The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
              at build_73zjrkym04ckyfoqe2nbhjv70.run(C:\Users\Baocheng\Desktop\WeX5_V3.7\model\Native\...\build\src\platforms\android\build.gradle:159)
      WARNING: The `android.dexOptions.incremental` property is deprecated and it has no effect on the build process.
      NDK is missing a "platforms" directory.
      If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\Users\Baocheng\Desktop\WeX5_V3.7\tools\adt-sdk\ndk-bundle.
      If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
      
      NDK is missing a "platforms" directory.
      If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\Users\Baocheng\Desktop\WeX5_V3.7\tools\adt-sdk\ndk-bundle.
      If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
      
      Incremental java compilation is an incubating feature.
      
      BUILD FAILED
      
      Total time: 6.456 secs
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      A problem occurred configuring root project 'android'.
      > Could not resolve all dependencies for configuration ':_debugApkCopy'.
         > Could not resolve com.github.tony19:logback-android-core:1.1.1-6.
           Required by:
               project :
            > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.
         > Could not resolve com.github.tony19:logback-android-classic:1.1.1-6.
           Required by:
               project :
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
         > Could not resolve org.slf4j:slf4j-api:1.7.21.
           Required by:
               project :
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
         > Could not resolve com.google.android.gms:play-services-location:+.
           Required by:
               project :
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
   C:\Users\Baocheng\AppData\Local\Temp\9bcb1f0d-ed50-445e-8b77-65e1ade21cc1\pack.xml:91: exec returned: 1
           at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:643)
           at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
           at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
           at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:497)
           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           at org.apache.tools.ant.Task.perform(Task.java:348)
           at org.apache.tools.ant.Target.execute(Target.java:435)
           at org.apache.tools.ant.Target.performTasks(Target.java:456)
           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
           at com.justep.deploy.app.utils.BuildHelper.execTask(Unknown Source)
           at com.justep.deploy.app.utils.Builder.main(Unknown Source)
      
      C:\Users\Baocheng\Desktop\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\cordova\node_modules\q\q.js:126
                          throw e;
                          ^
      Error code 1 for command: cmd with args: /s /c "C:\Users\Baocheng\Desktop\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\gradlew cdvBuildRelease -b C:\Users\Baocheng\Desktop\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline"
      ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
      You may not have the required environment or OS to build this project
      Error: cmd: Command failed with exit code 1
   ****ERROR****: 子任务 "exec" 执行失败。
   ****ERROR****: 任务 "buildAndroid" 执行失败。
   ****ERROR****: 执行出错:
   ****ERROR****: 错误信息: exec returned: 1
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
****ERROR****: 子任务 "java" 执行失败。
****ERROR****: 任务 "pack" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: Java returned: -3
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html

21

主题

71

帖子

189

积分

初级会员

Rank: 2

积分
189
QQ
 楼主| 发表于 2017-8-7 17:21:35 | 显示全部楼层
之前一直使用的是3.5版本,升级到3.7之后就出问题了
回复 支持 反对

使用道具 举报

发表于 2017-8-7 17:55:29 | 显示全部楼层
试试!
http://doc.wex5.com/wex5-app-question-list-0004/

如果还不行!
建议杀毒软件清理下机器!退出杀毒软件 !
重新解压一个版本在磁盘的(一级目录下),目录结构不要太长!
重新打包试试吧!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

21

主题

71

帖子

189

积分

初级会员

Rank: 2

积分
189
QQ
 楼主| 发表于 2017-8-8 09:13:28 | 显示全部楼层
liangyongfei 发表于 2017-8-7 17:55
试试!
http://doc.wex5.com/wex5-app-question-list-0004/

你说的方法我都尝试过了,还是不行:

FAILURE: Build failed with an exception.      
      * What went wrong:
      A problem occurred configuring root project 'android'.
      > Could not resolve all dependencies for configuration ':_debugApkCopy'.
         > Could not resolve com.github.tony19:logback-android-core:1.1.1-6.
           Required by:
               project :
            > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.
      
      BUILD FAILED      > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.
      
      
            > No cached version of com.github.tony19:logback-android-core:1.1.1-6 available for offline mode.Total time: 26.862 secs
      
         > Could not resolve com.github.tony19:logback-android-classic:1.1.1-6.
           Required by:
               project :
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
            > No cached version of com.github.tony19:logback-android-classic:1.1.1-6 available for offline mode.
         > Could not resolve org.slf4j:slf4j-api:1.7.21.
           Required by:
               project :
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
            > No cached version of org.slf4j:slf4j-api:1.7.21 available for offline mode.
         > Could not resolve com.google.android.gms:play-services-location:+.
           Required by:
               project :
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
            > No cached version listing for com.google.android.gms:play-services-location:+ available for offline mode.
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      
      E:\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\cordova\node_modules\q\q.js:126
                          throw e;
                          ^
      Error code 1 for command: cmd with args: /s /c "E:\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\gradlew cdvBuildRelease -b E:\WeX5_V3.7\model\Native\鍦熺綏缃梊build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline"
      ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
   C:\Users\Baocheng\AppData\Local\Temp\59cd8f0d-f48b-41a2-8ccf-b8a9ed79d375\pack.xml:91: exec returned: 1
      You may not have the required environment or OS to build this project
           at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:643)   Error: cmd: Command failed with exit code 1
   
           at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)****ERROR****: 子任务 "exec" 执行失败。
   
   ****ERROR****: 任务 "buildAndroid" 执行失败。
           at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)****ERROR****: 执行出错:
   
   ****ERROR****: 错误信息: exec returned: 1
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:497)
           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           at org.apache.tools.ant.Task.perform(Task.java:348)
           at org.apache.tools.ant.Target.execute(Target.java:435)
           at org.apache.tools.ant.Target.performTasks(Target.java:456)
           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
           at com.justep.deploy.app.utils.BuildHelper.execTask(Unknown Source)
           at com.justep.deploy.app.utils.Builder.main(Unknown Source)
****ERROR****: 子任务 "java" 执行失败。
****ERROR****: 任务 "pack" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: Java returned: -3
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
回复 支持 反对

使用道具 举报

发表于 2017-8-8 13:19:23 | 显示全部楼层
zapper 发表于 2017-8-8 09:13
你说的方法我都尝试过了,还是不行:

FAILURE: Build failed with an exception.      

你好楼主,该问题需要远程,已经通过技术服务QQ加你为好友了,请及时通过,我们会尽快QQ远程。
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

21

主题

71

帖子

189

积分

初级会员

Rank: 2

积分
189
QQ
 楼主| 发表于 2017-8-9 12:10:35 | 显示全部楼层
liangyongfei 发表于 2017-8-8 13:19
你好楼主,该问题需要远程,已经通过技术服务QQ加你为好友了,请及时通过,我们会尽快QQ远程。 ...

不好意思,昨天没有看到。
后来我去除了一些打包插件,可以正常打包了。
回复 支持 反对

使用道具 举报

41

主题

837

帖子

2271

积分

金牌会员

搬砖工

Rank: 6Rank: 6

积分
2271
QQ
发表于 2017-8-9 13:20:07 | 显示全部楼层
编译出错的问题很多 也很复杂具体还是从报错的信息里面去查看问题
Wex5开发者,欢迎互相交流学习
交流群:30057529


我要成为代码女神
回复 支持 反对

使用道具 举报

41

主题

837

帖子

2271

积分

金牌会员

搬砖工

Rank: 6Rank: 6

积分
2271
QQ
发表于 2017-8-9 13:20:27 | 显示全部楼层
liangyongfei 发表于 2017-8-8 13:19
你好楼主,该问题需要远程,已经通过技术服务QQ加你为好友了,请及时通过,我们会尽快QQ远程。 ...

什么时候给我也远程下呀
Wex5开发者,欢迎互相交流学习
交流群:30057529


我要成为代码女神
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-2 14:51 , Processed in 0.103218 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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