简体   繁体   中英

PhoneGap 3 Android deploy/install error

I've just installed PhoneGap on my Windows 8 machine. When I try to deploy my app on an emulated Android, it throws the following:

D:\>phonegap install android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] trying to install app onto device
[phonegap] no device was found
[phonegap] trying to install app onto emulator
   [error] An error occurred while emulating/deploying the android project.Buildfile: D:\app\platforms\andro
id\build.xml

Any idea what that error means?

I had the same problem.

You need to create a new Environment Variable called "ANDROID_HOME".

The value for this variable is your sdk location. In my case, I put: "C:\\Users\\Jesualdo\\Desktop\\sdk\\sdk\\tools".

And there is an important point:

First, you need to execute the emulator. Then you can install your app.

Check this link:

http://docs.phonegap.com/en/3.0.0rc1/guide_platforms_android_index.md.html#Android%20Platform%20Guide

I hope it helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM