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

QQ登录

只需一步,快速开始

查看: 1117|回复: 5

[结贴] APP打包错误

[复制链接]

4

主题

16

帖子

32

积分

新手上路

Rank: 1

积分
32
QQ
发表于 2016-11-8 11:14:35 | 显示全部楼层 |阅读模式
请问大神这是为什么啊?非常感谢

   生成android应用包:
      Running command: cmd "/s /c "D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\cordova\build.bat --debug --gradleArg=--offline""
      ANDROID_HOME=D:\WeX5_V3.6\tools\adt-sdk
      JAVA_HOME=D:\WeX5_V3.6\java\jre1.8
      Running: D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\gradlew cdvBuildDebug -b D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline
      Incremental java compilation is an incubating feature.
      :preBuild UP-TO-DATE
      :preDebugBuild UP-TO-DATE
      :checkDebugManifest
      :CordovaLib:preBuild UP-TO-DATE
      :CordovaLib:preDebugBuild UP-TO-DATE
      :CordovaLib:compileDebugNdk UP-TO-DATE
      :CordovaLib:compileLint
      :CordovaLib:copyDebugLint UP-TO-DATE
      :CordovaLib:checkDebugManifest
      :CordovaLib:preDebugAndroidTestBuild UP-TO-DATE
      :CordovaLib:preDebugUnitTestBuild UP-TO-DATE
      :CordovaLib:preReleaseBuild 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.6\model\Native\1234\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:prepareDebugDependencies
      :CordovaLib:compileDebugAidl
      :CordovaLib:compileDebugRenderscript
      :CordovaLib:generateDebugBuildConfig
      :CordovaLib:generateDebugAssets UP-TO-DATE
      :CordovaLib:mergeDebugAssets
      :CordovaLib:generateDebugResValues
      :CordovaLib:generateDebugResources
      :CordovaLib:mergeDebugResources
      :CordovaLib:processDebugManifest
      :CordovaLib:processDebugResources
      :CordovaLib:generateDebugSources
      注: 某些输入文件使用或覆盖了已过时的 API。
      注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
      :CordovaLib:compileDebugJavaWithJavac
      :CordovaLib:extractDebugAnnotations
      :CordovaLib:mergeDebugProguardFiles
      :CordovaLib:packageDebugRenderscript UP-TO-DATE
      :CordovaLib:packageDebugResources
      :CordovaLib:processDebugJavaRes UP-TO-DATE
      :CordovaLib:transformResourcesWithMergeJavaResForDebug
      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
      :CordovaLib:mergeDebugJniLibFolders
      :CordovaLib:transformNative_libsWithMergeJniLibsForDebug
      :CordovaLib:transformNative_libsWithSyncJniLibsForDebug
      :CordovaLib:bundleDebug
      :prepareAndroidCordovaLibUnspecifiedDebugLibrary
      :preReleaseBuild UP-TO-DATE
      :CordovaLib:compileReleaseNdk UP-TO-DATE
      :CordovaLib:copyReleaseLint UP-TO-DATE
      :CordovaLib:checkReleaseManifest
      :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

1

主题

1831

帖子

821

积分

高级会员

Rank: 4

积分
821
QQ
发表于 2016-11-8 11:15:41 | 显示全部楼层
你好,你的报错截图不全,能贴一下完整报错么
回复 支持 反对

使用道具 举报

4

主题

16

帖子

32

积分

新手上路

Rank: 1

积分
32
QQ
 楼主| 发表于 2016-11-8 11:16:11 | 显示全部楼层
      注: 某些输入文件使用或覆盖了已过时的 API。
      注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
      :CordovaLib:compileReleaseJavaWithJavac
      :CordovaLib:extractReleaseAnnotations
      :CordovaLib:mergeReleaseProguardFiles
      :CordovaLib:packageReleaseRenderscript UP-TO-DATE
      :CordovaLib:packageReleaseResources
      :CordovaLib:processReleaseJavaRes UP-TO-DATE
      :CordovaLib:transformResourcesWithMergeJavaResForRelease
      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
      :CordovaLib:mergeReleaseJniLibFolders
      :CordovaLib:transformNative_libsWithMergeJniLibsForRelease
      :CordovaLib:transformNative_libsWithSyncJniLibsForRelease
      :CordovaLib:bundleRelease
      :prepareAndroidJustepGetContentUnspecifiedLibrary
      :prepareComAndroidSupportAppcompatV72220Library
      :prepareComAndroidSupportSupportV42220Library
      :prepareDebugDependencies
      :compileDebugAidl
      :compileDebugRenderscript
      :generateDebugBuildConfig
      :generateDebugAssets UP-TO-DATE
      :mergeDebugAssets
      :generateDebugResValues
      :generateDebugResources
      :mergeDebugResources
      :processDebugManifest
      :processDebugResources
      :generateDebugSources
      D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\src\com\1\2\MainActivity.java:20: 错误: 需要';'
      package com.1.2;
                 ^
      D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\src\com\1\2\wxapi\WXEntryActivity.java:1: 错误: 需要';'
      package com.1.2.wxapi;
                 ^
      D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\src\com\1\2\wxapi\WXPayEntryActivity.java:1: 错误: 需要';'
      package com.1.2.wxapi;
                 ^
      D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\build\generated\source\r\debug\com\1\2\R.java:8: 错误: 需要';'
      package com.1.2;
                 ^
      :compileDebugJavaWithJavac FAILED
      
      BUILD FAILED
      
      Total time: 54.061 secs
      D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\build\generated\source\buildConfig\debug\com\1\2\BuildConfig.java:4: 错误: 需要';'
      package com.1.2;
                 ^
      5 个错误
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':compileDebugJavaWithJavac'.
      > Compilation failed; see the compiler error output for details.
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      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
      
      D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\cordova\node_modules\q\q.js:126
                          throw e;
                          ^
      Error code 1 for command: cmd with args: /s /c "D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\gradlew cdvBuildDebug -b D:\WeX5_V3.6\model\Native\1234\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline"
      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
   C:\Users\ttelva\AppData\Local\Temp\c31979e4-2654-4412-8bbb-adc81f1e02b7\pack.xml:88: 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)
****ERROR****: 子任务 "java" 执行失败。
****ERROR****: 任务 "pack" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: Java returned: -3
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
回复 支持 反对

使用道具 举报

4

主题

16

帖子

32

积分

新手上路

Rank: 1

积分
32
QQ
 楼主| 发表于 2016-11-8 13:33:01 | 显示全部楼层
大雁子 发表于 2016-11-8 11:15
你好,你的报错截图不全,能贴一下完整报错么

你好~发帖有字数限制呢~~前面都是正确的
回复 支持 反对

使用道具 举报

1

主题

1831

帖子

821

积分

高级会员

Rank: 4

积分
821
QQ
发表于 2016-11-8 13:41:02 | 显示全部楼层
该报错是因为应用包名的命名不符合java规范引起的。应用包名需是全小写的,中间由点分隔开,但每个分段的名称不可以使用数字作为开头,也不可以使用特殊字符。
回复 支持 反对

使用道具 举报

4

主题

16

帖子

32

积分

新手上路

Rank: 1

积分
32
QQ
 楼主| 发表于 2016-11-8 13:57:46 | 显示全部楼层
大雁子 发表于 2016-11-8 13:41
该报错是因为应用包名的命名不符合java规范引起的。应用包名需是全小写的,中间由点分隔开,但每个分段的名 ...

超级感谢版主的!果然打包成功啦!!请问贵公司提供APP制作服务吗
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-7-16 01:15 , Processed in 0.057930 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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