一旦完成了PhoneGap的安装,我创建了一个PhoneGap项目并尝试构建它。我收到以下错误:
当我运行
我该如何解决这个问题?
username@userpc:~/phonegap/testapp$ cordova build
cp: no such file or directory: /home/username/phonegap/testapp/icon.png
Running command: /home/username/phonegap/testapp/platforms/android/cordova/build
/home/username/phonegap/testapp/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error: ENOENT, no such file or directory '/home/username/android-sdk-linux/tools/tools/lib/build.template'
at Object.fs.openSync (fs.js:432:18)
at Object.fs.readFileSync (fs.js:286:15)
at /home/username/phonegap/testapp/platforms/android/cordova/lib/build.js:120:40
at _fulfilled (/home/username/phonegap/testapp/platforms/android/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/username/phonegap/testapp/platforms/android/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/username/phonegap/testapp/platforms/android/cordova/node_modules/q/q.js:760:13)
at /home/username/phonegap/testapp/platforms/android/cordova/node_modules/q/q.js:574:44
at flush (/home/username/phonegap/testapp/platforms/android/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
ERROR building one of the platforms: Error: /home/username/phonegap/testapp/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
当我运行
phonegap build
时,它会给我以下输出,但应用程序无法正常工作。username@userpc:~/phonegap/testapp$ phonegap build
[phonegap] executing 'cordova build'...
[phonegap] completed 'cordova build'
我该如何解决这个问题?