[英]phonegap build android: ANDROID_HOME is set to a non-existent path
I have the odd problem that "ANDROID_HOME is set to a non-existent oath", while I can dir
that path. 我有一个奇怪的问题,即“ ANDROID_HOME设置为不存在的誓言”,而我可以将该路径设为dir
。
Let me give you a walk-through for my cmd commands: 让我为您介绍我的cmd命令:
Z:\phonegap-test-app>phonegap build android
[phonegap] executing 'cordova build android'...
Running command: Z:\phonegap-test-app\platforms\android\cordova\build.bat
Error: Z:\phonegap-test-app\platforms\android\cordova\build.bat: Command failed
with exit code 2
Okay, dunno what exit code 2 is, so let's try to execute build.bat: 好的,不知道退出代码2是什么,所以让我们尝试执行build.bat:
Z:\phonegap-test-app>Z:\phonegap-test-app\platforms\android\cordova\build.bat
[Error: ANDROID_HOME is set to a non-existant path: "C:\Users\alexander.urban\Ap
pData\Local\Android\android-sdk"]
So I misspelled something in the path. 所以我在路径中拼错了一些东西。 Just that I C&P'ed it from the Explorer, so no misspelling today. 只是我从资源管理器中进行了C&P编辑,所以今天没有拼错。 C&P to the DIR command will show this as well: C&P到DIR命令也会显示以下内容:
Z:\phonegap-test-app>dir "C:\Users\alexander.urban\AppData\Local\Android\android
-sdk"
Datenträger in Laufwerk C: ist WINDOWS
Volumeseriennummer: 28B2-7DF4
Verzeichnis von C:\Users\alexander.urban\AppData\Local\Android\android-sdk
24.11.2014 09:16 <DIR> .
24.11.2014 09:16 <DIR> ..
24.11.2014 10:07 <DIR> add-ons
02.07.2014 20:03 220.209 AVD Manager.exe
24.11.2014 08:58 <DIR> build-tools
24.11.2014 09:04 <DIR> docs
24.11.2014 09:10 <DIR> extras
24.11.2014 08:58 <DIR> platform-tools
24.11.2014 09:06 <DIR> platforms
24.11.2014 09:08 <DIR> samples
02.07.2014 20:03 220.721 SDK Manager.exe
02.07.2014 20:03 1.170 SDK Readme.txt
24.11.2014 09:09 <DIR> sources
24.11.2014 09:45 <DIR> system-images
24.11.2014 10:07 <DIR> temp
24.11.2014 09:12 <DIR> tools
24.11.2014 08:53 71.075 uninstall.exe
4 Datei(en), 513.175 Bytes
13 Verzeichnis(se), 19.706.216.448 Bytes frei
Can anyone tell me what's wrong here? 谁能告诉我这是怎么回事?
EDIT: 编辑:
Z:\phonegap-test-app>set ANDROID_HOME="C:\Users\alexander.urban\AppData\Local\An
droid\android-sdk"
Had struggle with this for a lot of time and finally the following post by I.cotonea helped: 一直为此苦苦挣扎,最终I.cotonea的以下帖子有所帮助:
Refer: cordova platform add android not working while listing Android targets 参考: cordova平台添加android目标列表时,无法使用android
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.