cordova5.1以后gradle安装解压后报错
D:\phonegap\test>cordova build
Running command: D:\phonegap\test\platforms\android\cordova\build.bat
ANDROID_HOME=D:\adt-android\sdk
JAVA_HOME=D:\Program Files\Java\jdk1.7.0_65
Running: D:\phonegap\test\platforms\android\gradlew cdvBuildDebug -b D:\phonegap
\test\platforms\android\build.gradle -Dorg.gradle.daemon=true
Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMain
Starter.java:37)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
va:28)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
D:\phonegap\test\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "D:\phonegap\test\platforms\andro
id\gradlew cdvBuildDebug -b D:\phonegap\test\platforms\android\build.gradle -Dor
g.gradle.daemon=true"
ERROR building one of the platforms: Error: D:\phonegap\test\platforms\android\c
ordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: D:\phonegap\test\platforms\android\cordova\build.bat: Command failed with
exit code 1
at ChildProcess.whenDone (C:\Users\YJB\AppData\Roaming\npm\node_modules\cord
ova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
在cordova build 下载gradle之后C:\Users\Administrator\.gradle\wrapper
\dists\gradle-2.2.1-all\2m8005s69iu8v0oiejfej094b 解压后,报错
jdk 升级到1.8以后试试或者用最新的jdk试试你的应该是jdk版本低了
页:
[1]