Решил попробовать использовать в своем приложении баннер от Smaato. Собрал приложение, все работает. Но внезапно всплыла проблема: оказывается, приложение перестало устанавливаться на старых Android устройствах (проверено на 2.3 и 2.1). В LogCat примерно следующее:
12-05 21:35:01.755: E/dalvikvm(11220): LinearAlloc exceeded capacity (5242880), last=52
12-05 21:35:03.165: E/installd(32): dexopt failed on '/data/dalvik-cache/data@[email protected]@classes.dex' res = 11
В консоли это:
[2014-12-06 01:25:09 - MyApp] Installation error: INSTALL_FAILED_DEXOPT
Не работает ни отладка, ни установка из APK. Если убрать библиотеку Smaato, то начинает собираться нормально. В проекте есть и другие библиотеки. Я так понимаю, это глюк ОС и связан он не с конкретной библиотекой, а с превышением какого-то лимита. Как его можно исправить?
Вот полный лог, если необходимо:
12-05 21:34:36.706: D/installd(32): DexInv: --- BEGIN '/data/app/vmdl36109.tmp' ---
12-05 21:34:45.835: D/dalvikvm(11220): Note: class Lcom/google/android/gms/games/internal/IGamesService$Stub; has 186 unimplemented (abstract) methods
12-05 21:34:47.306: D/dalvikvm(11220): DexOpt: couldn't find field Landroid/app/Notification;.fullScreenIntent
12-05 21:34:47.316: D/dalvikvm(11220): DexOpt: couldn't find field Landroid/app/Notification;.actions
12-05 21:34:47.796: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:34:47.806: D/dalvikvm(11220): DexOpt: couldn't find field Landroid/graphics/BitmapFactory$Options;.inMutable
12-05 21:34:48.166: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:34:48.166: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:34:53.465: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:34:56.135: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:34:56.225: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:35:00.495: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:35:00.625: D/dalvikvm(11220): DexOpt: couldn't find static field
12-05 21:35:01.755: E/dalvikvm(11220): LinearAlloc exceeded capacity (5242880), last=52
12-05 21:35:01.765: E/dalvikvm(11220): VM aborting
12-05 21:35:01.866: I/DEBUG(28): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-05 21:35:01.875: I/DEBUG(28): Build fingerprint: 'generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys'
12-05 21:35:01.891: I/DEBUG(28): pid: 11220, tid: 11220 >>> /system/bin/dexopt <<<
12-05 21:35:01.891: I/DEBUG(28): signal 11 (SIGSEGV), fault addr deadd00d
12-05 21:35:01.897: I/DEBUG(28): r0 00000354 r1 afe1331d r2 0000000c r3 deadd00d
12-05 21:35:01.897: I/DEBUG(28): r4 00000026 r5 ad07ff50 r6 004fffd4 r7 0050000c
12-05 21:35:01.897: I/DEBUG(28): r8 00000000 r9 00000000 10 00000000 fp 00000000
12-05 21:35:01.897: I/DEBUG(28): ip ad080160 sp bedbf7d0 lr afe142dd pc ad035452 cpsr 20000030
12-05 21:35:01.955: I/DEBUG(28): #00 pc 00035452 /system/lib/libdvm.so
12-05 21:35:01.965: I/DEBUG(28): #01 pc 0003c994 /system/lib/libdvm.so
12-05 21:35:01.965: I/DEBUG(28): #02 pc 00057936 /system/lib/libdvm.so
12-05 21:35:01.965: I/DEBUG(28): #03 pc 00057c26 /system/lib/libdvm.so
12-05 21:35:01.975: I/DEBUG(28): #04 pc 000583b4 /system/lib/libdvm.so
12-05 21:35:01.975: I/DEBUG(28): #05 pc 000585c6 /system/lib/libdvm.so
12-05 21:35:01.995: I/DEBUG(28): #06 pc 00057eac /system/lib/libdvm.so
12-05 21:35:01.995: I/DEBUG(28): #07 pc 0005972e /system/lib/libdvm.so
12-05 21:35:02.019: I/DEBUG(28): #08 pc 000587a4 /system/lib/libdvm.so
12-05 21:35:02.045: I/DEBUG(28): #09 pc 0005840c /system/lib/libdvm.so
12-05 21:35:02.065: I/DEBUG(28): #10 pc 000585c6 /system/lib/libdvm.so
12-05 21:35:02.126: I/DEBUG(28): #11 pc 00057eac /system/lib/libdvm.so
12-05 21:35:02.165: I/DEBUG(28): #12 pc 000450f4 /system/lib/libdvm.so
12-05 21:35:02.216: I/DEBUG(28): #13 pc 00047954 /system/lib/libdvm.so
12-05 21:35:02.236: I/DEBUG(28): #14 pc 00048e1c /system/lib/libdvm.so
12-05 21:35:02.266: I/DEBUG(28): #15 pc 0004905a /system/lib/libdvm.so
12-05 21:35:02.316: I/DEBUG(28): #16 pc 0004b4a8 /system/lib/libdvm.so
12-05 21:35:02.416: I/DEBUG(28): #17 pc 0004b52a /system/lib/libdvm.so
12-05 21:35:02.436: I/DEBUG(28): #18 pc 0004b5d0 /system/lib/libdvm.so
12-05 21:35:02.495: I/DEBUG(28): #19 pc 0004a57c /system/lib/libdvm.so
12-05 21:35:02.576: I/DEBUG(28): #20 pc 0004a72e /system/lib/libdvm.so
12-05 21:35:02.596: I/DEBUG(28): #21 pc 00008a84 /system/bin/dexopt
12-05 21:35:02.615: I/DEBUG(28): #22 pc 00008bd4 /system/bin/dexopt
12-05 21:35:02.626: I/DEBUG(28): #23 pc 00008eba /system/bin/dexopt
12-05 21:35:02.656: I/DEBUG(28): #24 pc 0000c2c6 /system/lib/libc.so
12-05 21:35:02.676: I/DEBUG(28): #25 pc b00018aa /system/bin/linker
12-05 21:35:02.726: I/DEBUG(28): code around pc:
12-05 21:35:02.746: I/DEBUG(28): ad035440 4808ecb6 6b9b5823 d0002b00 4b064798
12-05 21:35:02.758: I/DEBUG(28): ad035450 701c2426 ed28f7d9 0004ab1c fffe57c4
12-05 21:35:02.766: I/DEBUG(28): ad035460 fffe8c30 00000354 deadd00d b510b40e
12-05 21:35:02.795: I/DEBUG(28): code around lr:
12-05 21:35:02.806: I/DEBUG(28): afe142cc 220ce008 2b005eab 1c28d003 47889901
12-05 21:35:02.816: I/DEBUG(28): afe142dc 35544306 d5f43f01 2c006824 b003d1ee
12-05 21:35:02.826: I/DEBUG(28): afe142ec bdf01c30 00024b44 000000b4 1c0fb5f0
12-05 21:35:02.826: I/DEBUG(28): stack:
12-05 21:35:02.835: I/DEBUG(28): bedbf790 406ee758 /dev/ashmem/mspace/dalvik-heap/0 (deleted)
12-05 21:35:02.845: I/DEBUG(28): bedbf794 406ee758 /dev/ashmem/mspace/dalvik-heap/0 (deleted)
12-05 21:35:02.866: I/DEBUG(28): bedbf798 afe3902c /system/lib/libc.so
12-05 21:35:02.866: I/DEBUG(28): bedbf79c afe38fd8 /system/lib/libc.so
12-05 21:35:02.866: I/DEBUG(28): bedbf7a0 00000000
12-05 21:35:02.886: I/DEBUG(28): bedbf7a4 afe142dd /system/lib/libc.so
12-05 21:35:02.916: I/DEBUG(28): bedbf7a8 406ee758 /dev/ashmem/mspace/dalvik-heap/0 (deleted)
12-05 21:35:02.926: I/DEBUG(28): bedbf7ac afe1331d /system/lib/libc.so
12-05 21:35:02.936: I/DEBUG(28): bedbf7b0 000137ec [heap]
12-05 21:35:02.936: I/DEBUG(28): bedbf7b4 ad07ff50 /system/lib/libdvm.so
12-05 21:35:02.945: I/DEBUG(28): bedbf7b8 ad07ff50 /system/lib/libdvm.so
12-05 21:35:02.956: I/DEBUG(28): bedbf7bc 004fffd4
12-05 21:35:02.966: I/DEBUG(28): bedbf7c0 0050000c
12-05 21:35:02.976: I/DEBUG(28): bedbf7c4 afe1337f /system/lib/libc.so
12-05 21:35:02.985: I/DEBUG(28): bedbf7c8 df002777
12-05 21:35:02.985: I/DEBUG(28): bedbf7cc e3a070ad
12-05 21:35:02.996: I/DEBUG(28): #00 bedbf7d0 000137e8 [heap]
12-05 21:35:02.996: I/DEBUG(28): bedbf7d4 ad03c999 /system/lib/libdvm.so
12-05 21:35:03.006: I/DEBUG(28): #01 bedbf7d8 00000034
12-05 21:35:03.016: I/DEBUG(28): bedbf7dc 00000000
12-05 21:35:03.025: I/DEBUG(28): bedbf7e0 00000034
12-05 21:35:03.025: I/DEBUG(28): bedbf7e4 ad017314 /system/lib/libdvm.so
12-05 21:35:03.025: I/DEBUG(28): bedbf7e8 000137ec [heap]
12-05 21:35:03.036: I/DEBUG(28): bedbf7ec 00000004
12-05 21:35:03.056: I/DEBUG(28): bedbf7f0 ad080c8c /system/lib/libdvm.so
12-05 21:35:03.056: I/DEBUG(28): bedbf7f4 406ee758 /dev/ashmem/mspace/dalvik-heap/0 (deleted)
12-05 21:35:03.056: I/DEBUG(28): bedbf7f8 41f91f1e /data/dalvik-cache/system@[email protected]@classes.dex
12-05 21:35:03.066: I/DEBUG(28): bedbf7fc 00018368 [heap]
12-05 21:35:03.066: I/DEBUG(28): bedbf800 41cab860 /data/dalvik-cache/system@[email protected]@classes.dex
12-05 21:35:03.066: I/DEBUG(28): bedbf804 ad05793b /system/lib/libdvm.so
12-05 21:35:03.165: W/installd(32): DexInv: --- END '/data/app/vmdl36109.tmp' --- status=0x000b, process failed
12-05 21:35:03.165: E/installd(32): dexopt failed on '/data/dalvik-cache/data@[email protected]@classes.dex' res = 11
12-05 21:35:03.208: W/PackageManager(110): Package couldn't be installed in /data/app/ru.bartwell.myapp.apk