Error: “Failed to install apk on device 'emula

2019-01-25 05:02发布

I have run my application using an emulator. Its taking so long time of about 5 mins to upload & 2 mins of installing my application on my emulator. After the two minutes it fails.

This is the Error console,

[2013-03-28 14:13:18 - newwaterreadingapp] ------------------------------
[2013-03-28 14:13:18 - newwaterreadingapp] Android Launch!
[2013-03-28 14:13:18 - newwaterreadingapp] adb is running normally.
[2013-03-28 14:13:18 - newwaterreadingapp] Performing     
com.example.newwaterreadingapp.MainActivity activity launch
[2013-03-28 14:13:18 - newwaterreadingapp] Automatic Target Mode: using existing     emulator 'emulator-5556' running compatible AVD 'NewAvd_water_electricity_reading'
[2013-03-28 14:13:18 - newwaterreadingapp] Uploading newwaterreadingapp.apk onto device 'emulator-5556'
[2013-03-28 14:18:31 - newwaterreadingapp] Installing newwaterreadingapp.apk...
[2013-03-28 14:20:35 - newwaterreadingapp] Failed to install newwaterreadingapp.apk on   device 'emulator-5556!
[2013-03-28 14:20:35 - newwaterreadingapp] (null)
[2013-03-28 14:20:37 - newwaterreadingapp] Launch canceled!

My application is located in E:\Projects folder. And I have increased my adb timeout to 15000ms. But still I see that my application is not loaded on to emulator.

6条回答
Melony?
2楼-- · 2019-01-25 05:31

Yon can increase your adb timeout setting in eclipse. Go to Preferences-> Android-> DDMS-> find "ADB connection time out (ms)" and give some more higher value.

Also, try to see if your emulator in connected to the DDMS. Either check from DDMS view or run "ADB devices" in command prompt

查看更多
【Aperson】
3楼-- · 2019-01-25 05:34

I had the same problem and it was caused by the emulator not having enough memory. I was running the 3.0 emulator with only 512mb RAM, and it was by pure chance that I saw a tonne of OutOfMemory exceptions in LogCat coming from system processes. Upped it to 1024mb and increased VM heap to 64mb and it installed fine.

查看更多
放我归山
4楼-- · 2019-01-25 05:39

If your using Emulator then open the Emulator and then go to settings->Apps->Select and uninstall your Application from Emulator.

Close the Emulator

Now Right click on your project->Run as->Run Configuration-> in Target Select Automatically pick compatible device option and then click on run.

查看更多
霸刀☆藐视天下
5楼-- · 2019-01-25 05:42

1 reason may be because your emulator is hanged shut it down and start a new one If the new emulator is also taking time to start then just restarts the eclipse It worked for me

查看更多
趁早两清
6楼-- · 2019-01-25 05:49

The default timeout of adb is small, so change its value If using eclipse follow the following path Window -> Preferences -> Android -> DDMS -> ADB Connection Timeout (ms)

查看更多
来,给爷笑一个
7楼-- · 2019-01-25 05:51

If you are using Emulator then restart.

If you are using phone then reboot then phone.

Completely power down and power up. That fixed it for me.

OR

In Eclipse, select WindowPreferences, then AndroidDDMS and set ADB connection time out (ms) to something longer than the default (which is 5000).

查看更多
登录 后发表回答