|
我使用的是WEX5 3.6版本,在发布部署一个demo程序时(程序需要下载了一个第三方的cordova插件)发现以下错误:
C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:519: 错误: 找不到符号
_locationPermissionRequestRequired = !cordova.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) && !cordova.hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION);
^
符号: 方法 hasPermission(String)
位置: 类型为CordovaInterface的变量 cordova
C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:519: 错误: 找不到符号
_locationPermissionRequestRequired = !cordova.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) && !cordova.hasPermission(Manifest.permission.ACCESS_COARSE_LOCATION);
^
符号: 方法 hasPermission(String)
位置: 类型为CordovaInterface的变量 cordova
C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:524: 错误: 找不到符号
this.cordova.requestPermissions(this, CAMERA_PERMISSION_REQUEST_CODE, new String[] { Manifest.permission.CAMERA, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION});
^
符号: 方法 requestPermissions(WikitudePlugin,int,String[])
位置: 类型为CordovaInterface的变量 cordova
C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:526: 错误: 找不到符号
this.cordova.requestPermission(this, CAMERA_PERMISSION_REQUEST_CODE, Manifest.permission.CAMERA);
^
符号: 方法 requestPermission(WikitudePlugin,int,String)
位置: 类型为CordovaInterface的变量 cordova
C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:529: 错误: 找不到符号
this.cordova.requestPermissions(this, CAMERA_PERMISSION_REQUEST_CODE, new String[] { Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION});
^
符号: 方法 requestPermissions(WikitudePlugin,int,String[])
位置: 类型为CordovaInterface的变量 cordova
C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\src\com\wikitude\phonegap\WikitudePlugin.java:1131: 错误: 方法不会覆盖或实现超类型的方法
@Override
^
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
15 个错误
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.
:compileDebugJavaWithJavac FAILED
BUILD FAILED
Total time: 1 mins 53.369 secs
C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\WeX5_V3.6\model\Native\Test1\build\src\platforms\android\gradlew cdvBuildDebug -b C:\WeX5_V3.6\model\Native\Test1\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\mark\AppData\Local\Temp\55dedf6c-6ad0-435e-9aca-f308974b5e7b\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
查了一下问题,似乎是说cordova版本6.0以上采用了新的硬件permission 策略,我用npm下载了新的版本cordova 6.5,覆盖\WeX5_V3.6\tools\cordova\目录,但问题还是存在?
请问升级cordova版本? |
|