问题
Gotta problem. My employer won't allow anybody access to run / line command tools on our computers. No way to run ADB (Android Debug Bridge) without that control. I'm using windows, no way to access the registry, no way to manually add cmd.exe, i've tried..) Screwing the staff is a sure way to reduce IT costs though, sigh.
I notice that sometimes when testing thru Eclipse with a real device plugged in via USB, that the application shows up on my android device.. and other times not.
Is there any way to use the Eclipse tools with Android plug in to 'install' the applications that I'm writing onto my real, physical device? They test fine as long as I'm USB plugged in. but don't remain after I disconnect.
I know, getting a new employer is probably the best answer here, but that's not in the cards right now. Good suggestion though : )
Anyone know of a work around for program installation to hardware?
Many thanks in advance, zip
回答1:
You really shouldn't need to do anything special. When you run an app from Eclipse, whether you are running it on the emulator or a device, it just uses adb to install it. If you disconnect from your computer at that point, it will remain. It is installed. There isn't a special "app running but not installed" state.
I'd be really curious to know in what situations you are finding your up uninstalled.
回答2:
I install the apk I am working on to a real device using Dropbox. Copy .apk from /bin directory right into your dropbox and then use the dropbox app to d/l and install it on the phone.
回答3:
You can mount your device's filesystem when plugged in via USB. From here, copy the .apk from your development computer to a location on the sdcard. Finally, get a free app like Astro File Manager or AndroZip to find the .apk on your device's filesystem. Once you select the .apk, you should be prompted with how you want to open it. If you open it with the app manager, you can install/uninstall it on the device.
回答4:
- Copy the .apk from
/bin/res
to, say, the desktop (or a desired folder in DropBox if you have it) - Hook your phone up via USB and make it a storage device (ie: flash drive).
- Drag the file in, double click on it and choose install
I have 3 android phones, one Android 2.1 and two with ICS, and they aren't all recognized the standard way.
回答5:
Another way is to load the apk onto an SD card, through a PC's USB port, then plug in that SD card into the handset (most android phones have micro SD card support). Now launch the apk and install it from there.
回答6:
When your device is connected to your PC via the USB debug cable, go to Eclipse. While your application project is open, select Run from upper menu. Then select your device from the window and run. This should be enough to load your application to your device. Now, even when you disconnect the USB cable, the application should be there.
来源:https://stackoverflow.com/questions/3697653/how-do-i-transfer-apk-files-to-device-using-eclipse