我在构建项目时遇到此错误。我已经为android home,ant,java和...设置了PATH设置。
任何想法都是这个问题的原因吗?
C:\helloworld>phonegap build android
[phonegap] executing 'cordova build android'...
cp: no such file or directory: C:\helloworld\icon.png
Running command: C:\helloworld\platforms\android\cordova\build.bat
ANDROID_HOME=C:\Users\Work-PC\AppData\Local\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_31
Running: C:\helloworld\platforms\android\gradlew cdvBuildDebug -b C:\helloworld\
platforms\android\build.gradle -Dorg.gradle.daemon=true
Exception in thread "main"
java.lang.NullPointerException
at org.gradle.wrapper.PathAssembler.getDistName(PathAssembler.java:77)
at org.gradle.wrapper.PathAssembler.getDistribution(PathAssembler.java:43)
at org.gradle.wrapper.Install.createDist(Install.java:43)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
C:\helloworld\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\helloworld\platforms\android\gradlew
cdvBuildDebug -b C:\helloworld\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: C:\helloworld\platforms\android\cord
ova\build.bat: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: C:\helloworld\platforms\android\cordova\build.bat: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\Work-PC\AppData\Roaming\npm\node_modules\phonegap
\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)