任务执行失败' CordovaLib:compileDebugJavaWithJavac'

时间:2016-07-05 01:03:04

标签: android ionic-framework

我正在尝试用android目标构建Android应用程序:android-22 我也尝试过android-17

但会出现此错误消息。

:CordovaLib:compileDebugJavaWithJavacC:\Users\Luis Araujo\Desktop\myApp2\platfor
 ms\android\CordovaLib\src\org\apache\cordova\CordovaInterfaceImpl.java:222:erro
r: cannot find symbol
    getActivity().requestPermissions(permissions, requestCode);
                 ^

^



* What went wrong:
Execution failed for task ':CordovaLib: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.

BUIL D FAILED

Total time: 24.973 secs
Error: Error code 1 for command: cmd with args: /s,/c,""C:\Users\Luis Araujo\Des
ktop\myApp2\platforms\android\gradlew" cdvBuildDebug -b "C:\Users\Luis Araujo\De
sktop\myApp2\platforms\android\build.gradle" -Dorg.gradle.daemon=true -Pandroid.
useDeprecatedNdk=true"

你能帮助我吗?

1 个答案:

答案 0 :(得分:1)

我已经解决了这个问题。

我安装了Android SDK的API 23,然后让我进入AndroidManifest.xmlproperty.properties目标android-23

然后,输入ionic build androidionic run android