Phonegap安装/构建中的错误 [英] Error in installation/Building of Phonegap
问题描述
我对Phonegap还是陌生的.我的PC中已经有ADT.
I am new to phonegap. I already have ADT in my PC.
1)我安装了NodeJ.
1)I installed NodeJs.
2)我在cmd上写
npm install -g phonegap
npm install -g phonegap
phonegap创建我的应用
phonegap create my-app
cd my-app
cd my-app
phonegap运行android
phonegap run android
[phonegap]detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[error] No platforms added to this project. Please use 'cordova platform add <platform>'.
在这里,我已经设置了正确的PATH.但是发生同样的问题.如果有人知道,请告诉我. thnx
Here I already set the correct PATH. But the same problem occurring. If anyone knows plz let me know. Thnx
仍然无法正常工作..有人知道吗.. Plz ..预先谢谢..
Still not working .. Can anybody knows this .. Plz .. Thanks in advance..
我为Android添加了以下路径:-
I added these path for android: -
D:\ adt-bundle-windows-x86 \ adt-bundle-windows-x86 \ sdk \ platform-tools \
D:\adt-bundle-windows-x86\adt-bundle-windows-x86\sdk\platform-tools\
D:\ adt-bundle-windows-x86 \ adt-bundle-windows-x86 \ sdk \ tools \
D:\adt-bundle-windows-x86\adt-bundle-windows-x86\sdk\tools\
这里已经设置了Java路径..那么这里出了什么问题..任何人都可以给解决方案plz
and Java path is already set here.. So What's the problem here.. anyone can give the solution plz
推荐答案
最后我得到了解决方案
最初我写了命令cordova platform add android
,然后显示了错误:
Initially I wrote the command cordova platform add android
, Then it was showing the error :
No platforms added to this project. Please use 'cordova platform add <platform>'.
我做了一些更改:
-
我将其更改为
cordova -d platform add android
我重设了所有路径,重设意味着再次设置我的JAVA_HOME路径和ANT_HOME路径,然后给出命令cordova -d platform add android
I reset all path, reset means again set my JAVA_HOME path and ANT_HOME path and then I gave the command cordova -d platform add android
然后再次显示错误,如There is no script engine for file extension .js
.然后只需在命令提示符assoc .js=JSFILE
中使用命令,然后将命令放在提示符cordova -d platform add android
上并完成,现在它包含平台内的android文件夹.
then it was again showing error like There is no script engine for file extension .js
. Then just use the command in commmand prompt assoc .js=JSFILE
and put the command on prompt cordova -d platform add android
and its done, now it contains android folder within platforms.
谢谢大家的帮助
这篇关于Phonegap安装/构建中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!