Problem with Phonegap

Asked

Viewed 51 times

2

How can I solve my problem?

I type:

C:\Users\Micro>cd MyApp

C:\Users\Micro\MyApp>phonegap run android

Then appears:

[phonegap] executing 'cordova run android' ...
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting
it manually.
Failed to find 'android' command in your 'PATH'. Try uptade your 'PATH' to
include path to valid SDK directory. 

C:\Users\Micro\MyApp>
  • Already verified that the system variable ANDROID_HOME exists?

  • There’s no such thing as what I do?

1 answer

0

You need to add the variable ANDROID_HOME to the system.

Open Powershell and write the following:

[Environment]::SetEnvironmentVariable("ANDROID_HOME", "C:\ installation location \android-sdk", "User")

(Do not forget to restart the command line from where you are calling phonegap after creating the variable)

  • Now it appeared: [phonegap] executing 'Cordova run android' ... Error: 'ANDROID_HOME' Environment variable is set to non-existent path: C: installation Location android-sdk Try uptade it Manually to point to Valid SDK directory.

  • @Joãovitor misunderstood me, when he defines the variable has to put the way to his android-sdk (something of the genre C:\Program Files (x86)\Android\android-sdk)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.