简体   繁体   English

phonegap构建android:ANDROID_HOME设置为不存在的路径

[英]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.

相关问题 Ubuntu:“ ANDROID_HOME”环境变量设置为不存在的路径 - Ubuntu : 'ANDROID_HOME' environment variable is set to non-existent path ubuntu上的“错误:&#39;ANDROID_HOME&#39;环境变量设置为不存在的路径” - “Error: 'ANDROID_HOME' environment variable is set to non-existent path” on ubuntu Windows 8.1 - ANDROID_HOME&#39; 环境变量设置为离子项目的不存在路径 - Windows 8.1 - ANDROID_HOME' environment variable is set to non-existent path for ionic project 在Mac上设置NativeScript。 “未设置ANDROID_HOME环境变量,或者它指向不存在的目录 - Setting up NativeScript on Mac. "The ANDROID_HOME environment variable is not set or it points to a non-existent directory ANDROID_HOME 环境变量未设置或指向 Ubuntu 中不存在的目录 - The ANDROID_HOME environment variable is not set or it points to a non-existent directory in Ubuntu 没有设置ANDROID_HOME,并且你的PATH Phonegap中没有“android”命令 - ANDROID_HOME is not set and “android” command not in your PATH Phonegap 错误:Android_HOME设置为不存在的路径: - Error:Android_HOME is set to non-existant path: Phonegap错误:未设置ANDROID_HOME - Phonegap Error: ANDROID_HOME is not set 未设置ANDROID_HOME,路径中也未设置“ android” - ANDROID_HOME is not set and “android” not in your path 如何在 ubuntu 中设置 ANDROID_HOME 路径? - How to set ANDROID_HOME path in ubuntu?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM