views:

812

answers:

3

I am the beginner for android development. i followed the procedure as specified in developer.google.com . for installing i Tried to crete AVD(Android virtual device) through command path.I executed at command prompt.

android create avd --target 2 --name my_avd

But the Error is coming "Error: Target id is not valid. Use 'android.bat list targets' to get the target ids."

After executing android.bat list targets it is showing blank. I am not able to figure out the problem as i have already set the path also.

+1  A: 

I think you use "android create avd -n xxx -t 2" to create AVD, and use "android.bat list targets" to find the creation result. You should use "android list avds" to list AVD. Targets is different from virtual devices.

XC
THe problem is resolved.windows by default is not loading api for android virtual device.we need to manually start the downloading of those.follow this procedure:-> go to android sdk folder which u have extracted. to the tools folder-> Run android batch file a api would be loaded. Here go to settings and mark "Force https to fetch from http-> Then go to availabe packages and amrk the link provided and install it.after following this procedure all the above specified errors would be resolved.
hitesh bansal
+1  A: 

You may have no targets installed. Check available packages in sdk manager and install some.

dtmilano
+2  A: 

THe problem is resolved. windows by default is not loading api for android virtual device. we need to manually start the downloading of those. follow this procedure:

  1. go to android List item sdk folder which u have extracted. to the tools folder

  2. un android batch file a api would be loaded. Here go to settings and mark "Force https to fetch from http".

  3. Then go to availabe packages and amrk the link provided and install it.

    after following this procedure all the above specified errors would be resolved.

hitesh bansal