1. make sure JDK is installed instead of JRE, and JAVA_HOME variable is pointing to JDK installation path
2. make sure you have ant and android sdks installed, and there is android.bat inside android sdks
3. go to the android project directory
4. under this directory, use command: /path/to/android.bat/android.bat update project -p /path/to/project folder/ =======> this will create build.xml for building apk file
5. use this command: /path/to/ant directory/bin/ant debug ========> this will generate debug version apk
6. now you have an apk file ready for installation, use this command first: adb devices to test if a device is connected
7. after making sure you have a valid device connected, use this command: adb -d install path/to/your/app.apk ========> this will install the apk to your android device
8. after installing the app, we want to open the app, use this command: adb shell am start -n com.zhoubo/.AppName note: com.zhoubo represents the app source ==========> this will open the app named AppName from source com.zhoubo
No comments:
Post a Comment