简体   繁体   中英

linux command “android” : equivalent in Windows?

i'm use to linux environment but at the moment i have to develop an android app under a windows environment.

So i need to run the "android" command ( android.bat ) in the windows prompt ( located in $ANDROID_HOME/tools/ ) in order to add ant script and do other stuffs.

the thing is that this launches me the Android SDK Manager, instead of giving me command line answer lie : "project updated"... So my question is :

How do i run the android command under Windows ?? to run things such as :

android update project --path

Maybe i'm not running the right bat file ? I did many search over the internet, without finding any answers.

I managed to make work Ant perfectly though, with the " ant.bat " that is located in the ant directory

EDIT :

Problem solved.

instead of typing :

android update project --path XXX

in the $ANDROID_HOME/tools/ directory, which would open me the SDK Manager, i had to do :

android.bat update project --path XXX

You can make it even easier by setting the ANDROID_HOME environment variable to the path to the sdk directory and then adding the paths for tools and platform-tools to your system PATH environment variable.

Then you can run the command android instead of android.bat from the command line, as you are used to, without having to type the full path or change to the sdk directory.

There are instructions for setting Windows environment variables here .

I have encountered same problem in Windows. I did it this way and it works for me .

   $ $ANDROID_SDK/sdk/tools/android.bat update project -p .
     Updated local.properties
     Updated file C:\ndk\android-ndk-r9b\samples\hello-jni\proguard-project.txt
     It seems that there are sub-projects. If you want to update them
     please use the --subprojects parameter

Here first used "cd" command to go the ndk project directory that is way I used "."(dot) for path(-p)

$ANDROID_SDK/sdk/tools/android.bat update project -p .

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