Android应用并不总是在模拟器上启动

时间:2014-06-05 09:21:18

标签: android android-emulator

我正在使用Android模拟器和Eclipse ADT。奇怪的东西一直在发生。大约有10%的时间我尝试运行应用程序,它将应用程序上传到模拟器,安装它,获得成功并说在模拟器上启动活动,但我没有得到这条线

ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]

然后没有其他事情发生,应用程序也没有启动。然后我再次运行应用程序,它说已经安装并且运行完美。偶尔会发生这种情况,但当然它并没有给我带来任何问题,我只是再次运行它并且它有效,但我想知道这是否也会发生在其他人身上?有没有解决方案?

以下是控制台中显示的失败应用启动和随后成功启动的内容,您可以看到第一行中缺少Starting Intent行,第二行中出现此行。

[2014-06-05 14:38:13 - TradeApp] ------------------------------
[2014-06-05 14:38:13 - TradeApp] Android Launch!
[2014-06-05 14:38:13 - TradeApp] adb is running normally.
[2014-06-05 14:38:13 - TradeApp] Performing com.example.tradeapp.MainActivity activity launch
[2014-06-05 14:38:13 - TradeApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'GoogleAPI_4.4.2'
[2014-06-05 14:38:13 - TradeApp] Uploading TradeApp.apk onto device 'emulator-5554'
[2014-06-05 14:38:17 - TradeApp] Installing TradeApp.apk...
[2014-06-05 14:38:35 - TradeApp] Success!
[2014-06-05 14:38:36 - TradeApp] Starting activity com.example.tradeapp.MainActivity on device emulator-5554
[2014-06-05 14:44:06 - TradeApp] ------------------------------
[2014-06-05 14:44:06 - TradeApp] Android Launch!
[2014-06-05 14:44:06 - TradeApp] adb is running normally.
[2014-06-05 14:44:06 - TradeApp] Performing com.example.tradeapp.MainActivity activity launch
[2014-06-05 14:44:06 - TradeApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'GoogleAPI_4.4.2'
[2014-06-05 14:44:09 - TradeApp] Application already deployed. No need to reinstall.
[2014-06-05 14:44:09 - TradeApp] Starting activity com.example.tradeapp.MainActivity on device emulator-5554
[2014-06-05 14:44:11 - TradeApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.tradeapp/.MainActivity }

1 个答案:

答案 0 :(得分:0)

是的,有时候应用程序将无法启动此问题,当Android ddms有错误或模拟器启动应用程序时超时 尝试使用较低的API进行模拟器