English 中文(简体)
Android模拟器在应用程序关闭后卸载应用程序,但我需要测试序列化
原标题:Android emulator unistalls application after the app is closed, but I need to test serialization

我正试图在android上为电子邮件应用程序实现序列化(存储用户名、密码、服务器等),但为了测试它,我必须关闭模拟器中的应用程序,然后重新打开它,以确保它查找并找到带有序列化对象的文件。问题是,当我关闭模拟器上的应用程序时,会卸载该应用程序。我用finish()函数关闭应用程序。关于为什么会发生这种情况,有什么线索吗?直到我的发展阶段,它才这么做。感谢您提供的任何帮助。

问题回答

When you close an android app in the emulator, it does not uninstall it. Also, when you force your application to finish using the finish() method, that only closes the application, and will not uninstall it either.

最终,问题出现在其他方面,要么是您在应用程序代码中添加的内容,要么是安装在用于测试的虚拟设备中的另一个应用程序。

此外,每次从eclipse环境中启动应用程序时,只有当启动的版本与设备中已安装的版本不同时(如果已安装),应用程序才应自行安装。

试着用一张新的SD卡制作一个新的虚拟设备,以防万一,试着把你的应用程序单独放在里面,看看它是否正常工作。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签