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

QQ登录

只需一步,快速开始

查看: 10862|回复: 16

[处理中5] BeX5 3.7版本的 cordova-plugin-background-geolocation 方法如何使用

[复制链接]

3

主题

12

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
发表于 2017-8-7 14:04:12 | 显示全部楼层 |阅读模式
如题

api文档

api文档

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36178
发表于 2017-8-7 15:04:07 | 显示全部楼层
可以参考/Native/plugins/cordova-plugin-background-geolocation/plugin.js.xdoc中API的说明
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

3

主题

12

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2017-8-7 17:00:52 | 显示全部楼层
jishuang 发表于 2017-8-7 15:04
可以参考/Native/plugins/cordova-plugin-background-geolocation/plugin.js.xdoc中API的说明

麻烦问一下 这个插件打包进去就会报错是为什么啊
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36178
发表于 2017-8-7 17:14:35 | 显示全部楼层
具体报什么错?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

3

主题

12

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2017-8-7 17:17:56 | 显示全部楼层
jishuang 发表于 2017-8-7 17:14
具体报什么错?

BUILD FAILED
      
      Total time: 11.817 secs
      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****: 子任务 "exec" 执行失败。
   ****ERROR****: 任务 "buildAndroid" 执行失败。
   ****ERROR****: 执行出错:
   ****ERROR****: 错误信息: exec returned: 1
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
   C:\Users\ADMINI~1\AppData\Local\Temp\bf2a61f2-5eb3-4579-bc74-b0b20c6b4bb6\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
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36178
发表于 2017-8-7 17:22:04 | 显示全部楼层
发Native下自己应用目录下/log/build.log文件
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

3

主题

12

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2017-8-7 17:26:28 | 显示全部楼层
jishuang 发表于 2017-8-7 17:22
发Native下自己应用目录下/log/build.log文件

开始......
   
保存配置信息:
   
环境初始化:
   
编译UI2资源:
   开始......
      
   [JUSTEP_HOME in UIServer]: D:\X5work\BeX5_V3.7
   2017-08-07 17:09:10 参数1: D:\X5work\BeX5_V3.7/runtime/UIServer
   2017-08-07 17:09:10 参数2:
   2017-08-07 17:09:10 参数3: D:/X5work/BeX5_V3.7/model/Native/ceshi/www/x5/UI2
   2017-08-07 17:09:10 参数4:
   2017-08-07 17:09:10 参数5:
   2017-08-07 17:09:10 参数6: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:10 参数7: 3
   2017-08-07 17:09:10 参数8: v_6152_nol_zh_CNs_d_m
   2017-08-07 17:09:10 参数9:
   [JUSTEP_HOME in UIServer]: D:\X5work\BeX5_V3.7
   2017-08-07 17:09:10 参数0: D:\X5work\BeX5_V3.7/runtime/UIServer
   2017-08-07 17:09:10 参数1:
   2017-08-07 17:09:10 参数2: D:/X5work/BeX5_V3.7/model/Native/ceshi/www/x5/UI2
   2017-08-07 17:09:10 参数3:
   2017-08-07 17:09:10 参数4:
   2017-08-07 17:09:10 参数5: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:10 参数6: 3
   2017-08-07 17:09:10 参数7: v_6152_nol_zh_CNs_d_m
   2017-08-07 17:09:10 参数8:
   2017-08-07 17:09:10 输出目录:D:\X5work\BeX5_V3.7\model\Native\ceshi\www\x5\UI2
   2017-08-07 17:09:10 开始清空输出目录...
   2017-08-07 17:09:10 清空输出目录成功
   2017-08-07 17:09:10 开始编译...
   2017-08-07 17:09:10 开始编译WINDOW文件: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:10 开始-WINDOW生成中间文件: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/window/server ...
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/window/server
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/model/server ...
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/model/server
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/data/server ...
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/common/server ...
   2017-08-07 17:09:10 加载模块:/UI2/system/resources ...
   2017-08-07 17:09:10 加载模块:/UI2/system/resources
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/common/server
   2017-08-07 17:09:10 加载模块:/UI2/system/components/justep/data/server
   2017-08-07 17:09:10 结束-WINDOW生成中间文件: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:10 开始-中间文件生成缓存文件: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:11 结束-中间文件生成缓存文件: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:11 结束编译WINDOW文件: /UI2/ceshi/ceshi.w
   2017-08-07 17:09:11 编译Window数:1
   2017-08-07 17:09:11 编译Window成功数:1
   2017-08-07 17:09:11 编译Window失败数:0
   2017-08-07 17:09:11 编译成功
   2017-08-07 17:09:11 开始复制资源...
   2017-08-07 17:09:12 复制资源成功
   2017-08-07 17:09:12 开始生成首页...
   2017-08-07 17:09:12 生成首页成功
   2017-08-07 17:09:12 cordova plugin: cordova-plugin-x-toast,cordova-plugin-inappbrowser,cordova-plugin-app-version,cordova-plugin-keyboard,cordova-plugin-spinner-dialog,cordova-plugin-background-geolocation,
   2017-08-07 17:09:12 services:
   编译UI资源:
      
   完成。
   
编译UIX资源:
   
编译UI资源:
   
环境初始化:
   
   开始......
      
   生成应用环境准备:
      
   复制模版工程:
      
   复制工程:
      
   复制WWW资源:
      
   更新工程信息:
      
   增加插件:
      使用到的插件: [cordova-plugin-background-geolocation, cordova-plugin-whitelist, cordova-plugin-splashscreen, cordova-plugin-app-preferences, com.justep.cordova.plugin.app.utils, com.justep.cordova.plugin.engine.tencent, cordova-plugin-x-toast, cordova-plugin-inappbrowser, cordova-plugin-app-version, cordova-plugin-keyboard, cordova-plugin-spinner-dialog, cordova-plugin-background-geolocation]
      开始安装插件......
      开始准备插件参数......
      插件 "cordova-plugin-background-geolocation" 参数如下:
      插件 "cordova-plugin-splashscreen" 参数如下:
      插件 "cordova-plugin-app-preferences" 参数如下:
      插件 "cordova-plugin-file" 参数如下:
      插件 "cordova-plugin-file-transfer" 参数如下:
           请求访问相册时的提示(TRANSFER_PHOTOLIBRARY_USAGE_DESCRIPTION):App需要您的同意才可以访问相册
      插件 "cordova-plugin-network-information" 参数如下:
      插件 "cordova-plugin-zip" 参数如下:
      插件 "cordova-plugin-inappbrowser" 参数如下:
      插件 "cordova-plugin-x-toast" 参数如下:
      插件 "com.justep.cordova.plugin.app.utils" 参数如下:
      插件 "com.justep.cordova.plugin.engine.tencent" 参数如下:
           引擎选择方式(webViewEngine):auto
      插件 "cordova-plugin-app-version" 参数如下:
      插件 "cordova-plugin-keyboard" 参数如下:
      插件 "cordova-plugin-spinner-dialog" 参数如下:
      插件参数准备完成
      Installing "cordova-plugin-mauron85-background-geolocation" for android
      Installing "cordova-plugin-mauron85-background-geolocation" for ios
      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 "com.justep.cordova.plugin.engine.tencent" for android
      Installing "com.justep.cordova.plugin.engine.tencent" for ios
      Installing "cordova-plugin-app-version" for android
      Installing "cordova-plugin-app-version" for ios
      Installing "cordova-plugin-keyboard" for android
      Installing "cordova-plugin-keyboard" for ios
      Installing "cordova-plugin-spinner-dialog" for android
      Installing "cordova-plugin-spinner-dialog" for ios
      插件安装完成
回复 支持 反对

使用道具 举报

3

主题

12

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2017-8-7 17:26:49 | 显示全部楼层
jishuang 发表于 2017-8-7 17:22
发Native下自己应用目录下/log/build.log文件

创建源代码工程:
      
   生成源代码:
      
   完成。
环境初始化:
   
   开始......
      
   生成应用环境准备:
      
   android应用环境准备:
      
   ios应用环境准备:
      
   生成android应用包:
      Running command: cmd "/s /c "D:\X5work\BeX5_V3.7\model\Native\ceshi\build\src\platforms\android\cordova\build.bat --debug""
      ANDROID_HOME=D:\X5work\BeX5_V3.7\tools\adt-sdk
      JAVA_HOME=D:\X5work\BeX5_V3.7\java\jre1.8
      Running: D:\X5work\BeX5_V3.7\model\Native\ceshi\build\src\platforms\android\gradlew cdvBuildDebug -b D:\X5work\BeX5_V3.7\model\Native\ceshi\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true
      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:\X5work\BeX5_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_edajodvyi0l007f6y2tss4s6l.run(D:\X5work\BeX5_V3.7\model\Native\ceshi\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:\X5work\BeX5_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:\X5work\BeX5_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.
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      A problem occurred configuring root project 'android'.
      > You have not accepted the license agreements of the following SDK components:
      [Google Repository, SDK Patch Applier v4, Android Support Repository].
      Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
      Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      
      D:\X5work\BeX5_V3.7\model\Native\ceshi\build\src\platforms\android\cordova\node_modules\q\q.js:126
                          throw e;
                          ^
      Error code 1 for command: cmd with args: /s /c "D:\X5work\BeX5_V3.7\model\Native\ceshi\build\src\platforms\android\gradlew cdvBuildDebug -b D:\X5work\BeX5_V3.7\model\Native\ceshi\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true"
      Error: cmd: Command failed with exit code 1
      Checking the license for package SDK Patch Applier v4 in D:\X5work\BeX5_V3.7\tools\adt-sdk\licenses
      Warning: License for package SDK Patch Applier v4 not accepted.
      Checking the license for package Google Repository in D:\X5work\BeX5_V3.7\tools\adt-sdk\licenses
      Warning: License for package Google Repository not accepted.
      Checking the license for package Android Support Repository in D:\X5work\BeX5_V3.7\tools\adt-sdk\licenses
      Warning: License for package Android Support Repository not accepted.
      
      BUILD FAILED
      
      Total time: 11.817 secs
      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****: 子任务 "exec" 执行失败。
   ****ERROR****: 任务 "buildAndroid" 执行失败。
   ****ERROR****: 执行出错:
   ****ERROR****: 错误信息: exec returned: 1
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
   C:\Users\ADMINI~1\AppData\Local\Temp\bf2a61f2-5eb3-4579-bc74-b0b20c6b4bb6\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
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36178
发表于 2017-8-7 17:41:55 | 显示全部楼层
NDK is missing a "platforms" directory.

这个错误应该不是这个插件的问题,确认不选这个插件就没问题?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

3

主题

12

帖子

22

积分

新手上路

Rank: 1

积分
22
QQ
 楼主| 发表于 2017-8-7 17:45:34 | 显示全部楼层
jishuang 发表于 2017-8-7 17:41
NDK is missing a "platforms" directory.

这个错误应该不是这个插件的问题,确认不选这个插件就没问题?

确定  首先是没有问题  其次打入这个插件开始报错
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-26 21:19 , Processed in 0.068511 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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