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

QQ登录

只需一步,快速开始

查看: 3176|回复: 5

[处理中3] 安卓打包出错

[复制链接]

26

主题

96

帖子

358

积分

中级会员

Rank: 3Rank: 3

积分
358
QQ
发表于 2017-7-21 09:20:00 | 显示全部楼层 |阅读模式
本帖最后由 笑看余生 于 2017-7-21 13:30 编辑


   
   开始......
      
   生成应用环境准备:
      
   android应用环境准备:
      
   ios应用环境准备:
      
   生成android应用包:
      Running command: cmd "/s /c "D:\WeX5_V3.7\model\Native\vgrevgervg\build\src\platforms\android\cordova\build.bat --debug --gradleArg=--offline""
      ANDROID_HOME=D:\WeX5_V3.7\tools\adt-sdk
      JAVA_HOME=D:\WeX5_V3.7\java\jre1.8
      Running: D:\WeX5_V3.7\model\Native\vgrevgervg\build\src\platforms\android\gradlew cdvBuildDebug -b D:\WeX5_V3.7\model\Native\vgrevgervg\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 D:\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_4umuu59e7n5y13g53txpq0dtr.run(D:\WeX5_V3.7\model\Native\vgrevgervg\build\src\platforms\android\build.gradle:155)
      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 D:\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 D:\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.
   C:\Users\1\AppData\Local\Temp\783b63af-35ba-4531-8951-affa68bf46ea\pack.xml:91: exec returned: 1
      
      
      BUILD FAILED
      
      Total time: 1.793 secsFAILURE: 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.
         > 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.
         > 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.
         > 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.
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      
      D:\WeX5_V3.7\model\Native\vgrevgervg\build\src\platforms\android\cordova\node_modules\q\q.js:126
                          throw e;
                          ^
           at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:643)
           at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)   Error code 1 for command: cmd with args: /s /c "D:\WeX5_V3.7\model\Native\vgrevgervg\build\src\platforms\android\gradlew cdvBuildDebug -b D:\WeX5_V3.7\model\Native\vgrevgervg\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        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
   
      Error: cmd: Command failed with exit code 1
   ****ERROR****: 子任务 "exec" 执行失败。
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)****ERROR****: 任务 "buildAndroid" 执行失败。
           at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   
   ****ERROR****: 执行出错:
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)****ERROR****: 错误信息: exec returned: 1
           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)
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html        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-7-21 11:32:09 | 显示全部楼层
错误日志的格式能整理一下吗??
太乱了

这样吧!你先试试打包仿途牛案例是否正常?、
报错信息先论坛搜下!
如果不能解决

请把完整的报错信息发来看下


或者试试杀毒软件清理下环境!然后退出杀毒,重新解压个版本!再次打包下仿途牛,是否正常?
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

26

主题

96

帖子

358

积分

中级会员

Rank: 3Rank: 3

积分
358
QQ
 楼主| 发表于 2017-7-21 13:31:06 | 显示全部楼层
liangyongfei 发表于 2017-7-21 11:32
错误日志的格式能整理一下吗??
太乱了

编辑了一下,就是加了定位插件以后就这样 了
回复 支持 反对

使用道具 举报

发表于 2017-7-21 14:20:23 | 显示全部楼层
笑看余生 发表于 2017-7-21 13:31
编辑了一下,就是加了定位插件以后就这样 了

哪个插件?是这个插件吗?
cordova-plugin-geolocation

不如不加定位插件就正常是吗??

看你的错误和这个挺像的
http://bbs.wex5.com/forum.php?mo ... or%2Boffline%2Bmode

你可以加他好友咨询下原因!

你的错误看上去是环境的原因,所以才让你清理下环境重新解压试试
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

26

主题

96

帖子

358

积分

中级会员

Rank: 3Rank: 3

积分
358
QQ
 楼主| 发表于 2017-7-22 15:50:23 | 显示全部楼层
liangyongfei 发表于 2017-7-21 14:20
哪个插件?是这个插件吗?
cordova-plugin-geolocation

对,是定位的插件,加了定位的插件就出错,但是如果不加的话打包的apk文件就会显示没有定位权限,项目里内嵌的高德地图就会显示无法定位,求教
回复 支持 反对

使用道具 举报

发表于 2017-7-24 10:54:56 | 显示全部楼层
笑看余生 发表于 2017-7-22 15:50
对,是定位的插件,加了定位的插件就出错,但是如果不加的话打包的apk文件就会显示没有定位权限,项目里 ...

打包外卖案例试试会报错吗?
本地测试打包 cordova-plugin-geolocation 插件并不会影响打包的!
你那儿是稳定的吗?

如果是环境原因!建议换个电脑试试
或者 杀毒软件清理下环境,退出杀毒软件重新解压个版本试试、。。。
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-7-10 22:55 , Processed in 0.097021 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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