如何通过重写旧数据库运行在模拟器Android应用程序?重写、模拟器、应用程序、数据库

2023-09-04 06:27:05 作者:还没开始就已失去

当我始终运行的应用程序,以测试从Eclipse的仿真器,默认情况下它永远不会卸载previous之一。它将维护数据库和相同的应用程序的文件previous副本,并运行新编译的code。

When I always run app to test in emulator from Eclipse , by default it never uninstalls previous one. It will maintain previous copy of database and files of the same app and run a new compiled code.

如果我要删除所有应用程序相关的文件,数据库每次我编译和运行它来测试?在Eclipse这个任何设置?我想避免每次运行之前手动卸载它的步骤。谢谢你。

What if I want to remove all app related files, databases every time I compile and run it to test? Any settings for this in Eclipse ? I want to avoid the step of manually uninstalling it before every run. Thanks.

推荐答案

您可以在命令提示符窗口中打开,并推出之前,执行:

You can have a command prompt window open, and before launching, execute:

adb uninstall your.project.package

在使用 ADB安装 -r 修改,应用程序重新安装和它的数据被保存。我还没有发现在Eclipse中任何地方更改此配置,但我认为这里面的SDK的Ant任务来完成。看看这个类了解更多信息。

when using adb install with the -r modifier, the app re-installs and its data is saved. I haven't found any place in Eclipse to change this configuration, but I think this is done inside the SDK's Ant tasks. Take a look at this class for more information