使用phonegap build android 失败

G:\phonegap\HelloWorld>phonegap build android
[phonegap] executing 'cordova build android ' ...
ANDROID_HOME=E:\Program Files (x86)\Android\android-sdk
JAVA_HOME=E:\Program Files\Java\jdk1.8.0_102
: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:mergeDebugProguardFiles

:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources

:CordovaLib:compileDebugAidl
:CordovaLib:generateDebugBuildConfig
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
:CordovaLib:processDebugManifest
:CordovaLib:processDebugResources

:CordovaLib:generateDebugSources

:CordovaLib:compileDebugJavaWithJavac
G:\phonegap\HelloWorld\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaInterfaceImpl.java:222: ����: �Ҳ�������
getActivity().requestPermissions(permissions, requestCode);
^
����: ���� requestPermissions(String[],int)
�: �� Activity
G:\phonegap\HelloWorld\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaInterfaceImpl.java:228: ����: �Ҳ�������
getActivity().requestPermissions(permissions, requestCode);
^
����: ���� requestPermissions(String[],int)
�: �� Activity
G:\phonegap\HelloWorld\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaInterfaceImpl.java:233: ����: �Ҳ�������
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
^
����: ���� M
�: �� VERSION_CODES
G:\phonegap\HelloWorld\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaInterfaceImpl.java:235: ����: �Ҳ�������
int result = activity.checkSelfPermission(permission);
^
����: ���� checkSelfPermission(String)
λ��: ����ΪActivity�ı��� activity
G:\phonegap\HelloWorld\platforms\android\CordovaLib\src\org\apache\cordova\Cordo
vaActivity.java:493: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ���
@Override
^
ע: ijЩ�����ļ�ʹ�û�����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
5 �����
FAILED

FAILURE: Build failed with an exception.

  • 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.

BUILD FAILED
Total time: 3.36 secs
Error: Error code 1 for command: cmd with args: /s,/c,"G:\phonegap\HelloWorld\pl
atforms\android\gradlew cdvBuildDebug -b G:\phonegap\HelloWorld\platforms\androi
d\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

这是怎么回事啊?使用cordova build android也是这个错误,求大神指教

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!