简体   繁体   中英

How to test my app on my phone? I have Eclipse w/ Android plug-in

Where do I copy the apk file on the Motorola Droid? Which directory? Are there any possible issues I need to be careful of, it's also my personal phone...

To install an apk file, you need to execute

adb install /path/to/file.apk

While the droid is connected. I would avoid using any programs other an adb to install your application. adb will definitely follow the rules and you should be able to clean things up, etc if something goes wrong. That may not be the case with other programs.

I should note, this is assuming you are writing the program yourself. adb is a program that comes with the Android development kit (I assumed you are using this as this is a programming related site. If you are not referring to this and you are simply trying to install a program on your phone, this question would probably be better on superuser.com)

Edit To address your comment. When you select "run" from eclipse, and you have your droid plugged in, it should give you the option to select which device you want to execute the code on. Double clicking on your droid will automatically install and launch the app. You may need to enable the development settings within the Settings menu though for it to be recognized. To confirm that eclipse (really it's adb) can see your droid, launch a terminal or command prompt and type adb devices while the droid is connected. If it's listed there, you're good to go.

I guess I was making it way more complicated than it needed to be. If you have eclipse with the Android plug-in, all you need to do is go into the settings of the phone, then applications, then development. Set the Debug mode to on. when you compile the app with eclipse I guess it looks for an actual phone first, if it detects it, then it loads the app on it. If no phone is detected and you have the ADV set up right it loads it there. Easy... There is a setting about unsigned apps in the application menu, I set it to accept and turned it off after, my apps are still on the phone and work... I am not sure if it was needed at all.

I don't know whether this is how you're supposed to do it, but get Astro File Manager, and you can install your app wherever you place it.

There shouldn't be anything you need to be careful of if it isn't rooted. Programs are pretty well contained and can't do much outside of their own little Dalvik machine.

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