首先,我安装了PhoneGap:
$sudo npm install -g phonegap
然后我创建了一个新项目:
$phonegap create hellophonegap
但是当我运行项目时:
$phonegap run android
我收到以下错误:
[~/hellophonegap]$phonegap run android [phonegap] executing 'cordova platform add android'... Unable to fetch platform android: Error: EACCES,mkdir '/home/crane/tmp/npm-28555-XalHvwaa' [phonegap] executing 'cordova run android'... No platforms added to this project. Please use 'cordova platform add platform'.
我已正确配置Android SDK环境变量.这被添加到我的.bashrc中:
export ANDROID_SDK=/home/crane/androidsdk export PATH=$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools:$PATH`
我正在使用Ubuntu 14.04,并运行PhoneGap v4.1.2-0.22.9