Honchar Denys
Honchar Denys

Reputation: 1518

Phonegap export to Android

I have this working and for a long time was all cool, then at some point it stopped working without me having touched it. I see this error:

ERROR building one of the platforms: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually. Detected 'android' command at C:\Users\Tower\bin but no 'tools' directory found near. Try reinstall Android SDK or update your PATH to include path to valid SDK directory.

When I do echo $ANDROID_HOME I see:

C:\Users\Tower\AppData\Local\Android\android-sdk\platform-tools;C:\Users\Tower\AppData\Local\Android\android-sdk\tools

which is correct and I have the android sdk. When I do echo $JAVA_HOME it shows:

C:\Progra~1\Java\jdk1.7.0_79;C:\Progra~1\Java\jdk1.7.0_79\bin

which is also correct. I have reinstalled both the Java JDK and the Android SDK. I am running this on Windows 10, X64.

Upvotes: 1

Views: 52

Answers (1)

Alex
Alex

Reputation: 46

In variable ANDROID_HOME must be only path to the root directory of android-sdk i.e. C:\Users\Tower\AppData\Local\Android\android-sdk.

In JAVA_HOME also must be only path to JDK root directory i.e. C:\Progra~1\Java\jdk1.7.0_79.

This PATHs C:\Users\Tower\AppData\Local\Android\android-sdk\platform-tools;C:\Users\Tower\AppData\Local\Android\android-sdk\tools must be in PATH System Environment Variable.

And this path to jdk bin directory C:\Progra~1\Java\jdk1.7.0_79\bin must be in PATH Environment Variable.

Edit:

PATH should include ; not :

Upvotes: 3

Related Questions