Iam a newbie to android.. Can anyone tell me How to run the app on device.. i have connected and enabled USB Debugging on device and running. But its always starting the emulator only. How can i run on device instead of emulator?
问题:
回答1:
I think your emulator is in Automatic. You can change that to Manual.
Try this,
Step 1
Go to Run Configuration
You can see three Columns Android,Target and Common.
Step2
Select the Target
Step 3
Choose Always prompt to pick device.Click Ok
Step 4
Now run your project you should see the emulator and your device. Select your device and click ok.
Hope it helps.
回答2:
Step1: Open your eclipse.
Step2: Select the project you have.
Step3: Right Click on it.
Step4: goto run as
Step5: select run configuration.
Step6: Select Target Tab.
Step7: Click on "Always Prompt to pick one device."
Step8: Click on Apply.
Step9: and Hit the Run. If you are connected to the device it will show you a list to choose.
If your device is not visible.Close the Dialog.
Go to DDMS. select devices. Click on the right top corner down arrow and select Reset adb.
Ideally It should show up your device in the list. select the device of your choice.
Click on OK ..
Hope this will help you.
回答3:
Read docs here: http://developer.android.com/tools/device.html
Note you have to run your device in developer mode (Settings -> Developer options -> USB degubbing enabled) and you need to install drivers for your device so ADB will be able to talk to it (these are different drivers that used for USB storage access, so even you can mount your SD card as USB storage on your desktop, you may still lack ADB drivers). To see if ADB sees your device, connect it and in shell try:
adb devices
Finally, check if you did not tell Eclipse to not ask for device on launch and use remembered selection (which may be your emulator). Do Project -> Properties -> Run/Debug settings, then double click on right entry, "Target" tab and switch to "always prompt to pick device"
回答4:
The first page on Google with keyword "install apk on real device" show me this:
Installing Applications With Android SDK
It is possible to install APK files without utilizing the Android Market, although the process is more difficult and complex. To avoid the Android Market, you need to use Android SDK.
Download and install the Google Android SDK program and the Android USB drivers. The download links are as follows: . http://code.google.com/android/intro/installing.html
http://dl.google.com/android/android_usb_windows.zip
You need to modify your Android’s settings to allow the installation of applications from other sources. Under “Settings,” select “Application Settings” and then enable “Unknown Sources.” Also under “Settings,” select “SD Card” and “Phone Storage,” and finally enable “Disable Use for USB Storage”
This last step is easy. Open Command Prompt and type the following: adb install <1>/<2>.apk
However, when you type the command, replace <1> with the path to your APK file and replace <2> with the name of the APK file.
You’re done! Your application is now ready for your use and enjoyment.
and this is the second one:
You can deploy the .apk file on your local server(apache or jboss) with a static IP to make the file available for download. Now just open the download link of the apk file in your mobile browser. The device will automatically start the installation after the download completes.