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

QQ登录

只需一步,快速开始

查看: 1883|回复: 1

[处理中3] 外卖例子app打包出错

[复制链接]

25

主题

53

帖子

217

积分

中级会员

Rank: 3Rank: 3

积分
217
QQ
发表于 2018-5-31 17:00:53 | 显示全部楼层 |阅读模式
。。。。。

      :compileReleaseJavaWithJavac
      :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:160: 错误: 找不到符号
              LocationManager myLocationManager = (LocationManager) cordova.getActivity().getSystemService(Context.LOCATION_SERVICE);
              ^
        符号:   类 LocationManager
        位置: 类 BaiduLocation
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:160: 错误: 找不到符号
              LocationManager myLocationManager = (LocationManager) cordova.getActivity().getSystemService(Context.LOCATION_SERVICE);
                                                   ^
        符号:   类 LocationManager
        位置: 类 BaiduLocation
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:160: 错误: 找不到符号
              LocationManager myLocationManager = (LocationManager) cordova.getActivity().getSystemService(Context.LOCATION_SERVICE);
                                                                                                           ^
        符号:   变量 Context
        位置: 类 BaiduLocation
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:161: 错误: 找不到符号
              if(myLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
                                                     ^
        符号:   变量 LocationManager
        位置: 类 BaiduLocation
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:167: 错误: 程序包Settings不存在
              int state = Settings.Secure.getInt(cordova.getActivity().getContentResolver(), Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF);
                                                                                                     ^
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:167: 错误: 程序包Settings不存在
              int state = Settings.Secure.getInt(cordova.getActivity().getContentResolver(), Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF);
                                                                                                                                    ^
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:167: 错误: 程序包Settings不存在
              int state = Settings.Secure.getInt(cordova.getActivity().getContentResolver(), Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF);
                                  ^
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:168: 错误: 程序包Settings不存在
              if (state == Settings.Secure.LOCATION_MODE_OFF) {
                                   ^
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:177: 错误: 找不到符号
            Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
            ^
        符号:   类 Intent
        位置: 类 BaiduLocation
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:177: 错误: 找不到符号
            Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
                                ^
        符号:   类 Intent
        位置: 类 BaiduLocation
      D:\B70\model\Native\外卖\build\src\platforms\android\src\com\justep\cordova\plugin\baidulocation\BaiduLocation.java:177: 错误: 找不到符号
            Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
                                       ^
        符号:   变量 Settings
        位置: 类 BaiduLocation
      注: 某些输入文件使用或覆盖了已过时的 API。
      注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
      注: 某些输入文件使用了未经检查或不安全的操作。
      注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
      11 个错误
      :compileReleaseJavaWithJavac FAILED
      
      BUILD FAILED
      
      Total time: 29.024 secs
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':compileReleaseJavaWithJavac'.
      > 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:\B70\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 "D:\B70\model\Native\澶栧崠\build\src\platforms\android\gradlew cdvBuildRelease -b D:\B70\model\Native\澶栧崠\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
   D:\down\tmp\716c864f-7551-474d-920a-5f531e7702e5\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)
****ERROR****: 子任务 "java" 执行失败。
****ERROR****: 任务 "pack" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: Java returned: -3
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
发表于 2018-6-1 13:25:14 | 显示全部楼层
升级到3.8最新版本就可以了,这个是旧版本bug
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-28 04:11 , Processed in 0.082008 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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