Android: Eclipse doesn't pushed new version of app to emulator

瘦欲@ 提交于 2019-12-11 06:52:32

问题


When developing for Android in Eclipse, the emulator relaunches the old version of the app each time I run the project unless I go through the rather arduous procedure of Settings -> Applications -> Manage applications -> [my application] -> Uninstall -> Ok -> Ok in the emulator.

I had this problem on some projects but not on others when following the tutorials on the Android Developers site, and my friend turns out to have the same problem. Although this has been asked before (here and to some extent here) their problem turned out to be "some extra quotes on one of the xml file" and I can see no such thing in my project. Otherwise people seems to be saying that Eclipse should push the new version. Unfortunately, it doesn't.

I would be grateful for any suggestions.


回答1:


I had this issue as well, and what i figured out was:

If you are using your device for debugging, then you should launch a debug session, not a run one.

On the other hand, if you want to install an application, or you want to launch a run session directly on your device, the version of your application set in the androidManifest.xml must be greater than the one on your phone.




回答2:


  1. Try Menu-Project-Clean, Select your project to clean, this will delete everything but the source. Eclipse should re-build automagically if not select Menu-Project-Build Automatically.
  2. Right click your project, Android tools, fix project should automatically fix some unknown error maybe
  3. Double check your xml, an error in a layout could cause your situation. A wrong id for example will not show as an error in eclipse.


来源:https://stackoverflow.com/questions/5680433/android-eclipse-doesnt-pushed-new-version-of-app-to-emulator

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