I have a simple \"Hello Android\" application on my computer (Eclipse environment), and I have built an APK file. How do I transfer the APK file to my Android phone for test
Put the APK file into the tools folder in the Android SDK and give the path to tools in the command prompt and use the command:
adb install "name".apk file
I was using the command prompt to manually install the .apk file on my device (Nexus 7) but the following should work in theory on any android device (after enabling the device for developer mode). This method was becoming cumbersome so I created a simple batch file so now all I have to do is double-click it and it installs for me (device must be plugged in to my development machine). Just create a text file and save it as .BAT with the following text (customize to accommodate your file paths):
cd C:\{**path to your install location**}\sdk\platform-tools
adb install C:\{**path to your .apk file**}\{**project/apk file name**}.apk
For debugging:
Installing the APK file:
adb install path-to-your-apk-file.apk
).Directly connect your Android device and select the USB debugging option in the device. Eclipse will itself find your device, and then just run the code.
Or alternatively, paste your APK file in the Android SDK platform-tools folder and from the command prompt install it like this:
D:......../platform-tools> adb install yourfile.apk.