Android: Restarting with a fresh version of the app being developed

痞子三分冷 提交于 2019-12-08 07:12:45

问题


I'm new to Android so please be as explicit as possible. I'm trying to create a new activity. the problem is that when I run the emulator from eclipse, I get the old version of my app. I guess it's still running. Is there a way to force a fresh install/restart of my new app? I've read about the life cycle, and this might be related to that... but not sure.

How can I keep testing my app while I'm developing, and get the most recent version of my code on the emulator?

Any help will be appreciated.


回答1:


Just run the app from eclipse and the new version will get pushed to the emulator and force stop or replace the old version. Note that if there are any compile errors, it will not do it. If you just launch the emulator from the avd manager, or just run the app from the emulator launcher it will only have the last version you pushed to the emulator.

You don't need to restart the emulator or anything.




回答2:


If you ever do need to uninstall, you should be able to do this through the phone/emulator menus Settings->Applications->Manage Applications->[Application Name]

However, this is not normally necessary, as the latest version should be pushed on a successful IDE build (or ant install)

Hope this helps,

Phil Lello



来源:https://stackoverflow.com/questions/5602537/android-restarting-with-a-fresh-version-of-the-app-being-developed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!