phonegap构建错误 - 您可能没有所需的环境

时间:2015-07-08 10:14:20

标签: cordova build command-line-interface

我什么时候尝试使用以下方法构建我的phonegap项目:     $phonegap构建

在编译失败时遇到错误。请找出错误信息并证明其来源和解决方案。

E:\phonegap projects\myproject>cordova build android
Running command: cmd "/s /c ""E:\phonegap projects\myproject\platforms\android\cordova\build.bat"""
ANDROID_HOME=C:\Users\rajan\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_45
cp: copyFileSync: could not write to dest file (code=EPERM):E:\phonegap projects\myproject\platforms\android\gradlew.bat

shell.js: internal error
Error: EPERM, operation not permitted 'E:\phonegap projects\myproject\platforms\android\gradle\wrapper\gradle-wrapper.properties' at Error (native) at Object.fs.openSync (fs.js:500:18) at Object.fs.writeFileSync (fs.js:1099:15) at Object._sed (E:\phonegap projects\myproject\platforms\android\cordova\node_modules\shelljs\src\sed.js:39:8) at Object.sed (E:\phonegap projects\myproject\platforms\android\cordova\node_modules\shelljs\src\common.js:172:23) at E:\phonegap projects\myproject\platforms\android\cordova\lib\build.js:322:23 at _fulfilled (E:\phonegap projects\myproject\platforms\android\cordova\node_modules\q\q.js:798:54) at self.promiseDispatch.done (E:\phonegap projects\myproject\platforms\android\cordova\node_modules\q\q.js:827:30) at Promise.promise.promiseDispatch (E:\phonegap projects\myproject\platforms\android\cordova\node_modules\q\q.js:760:13) at E:\phonegap projects\myproject\platforms\android\cordova\node_modules\q\q.js:574:44
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1 at ChildProcess.whenDone (C:\Users\rajan\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134: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)

0 个答案:

没有答案