手机上程序打开一闪,自动关闭

用eclipse在DDMS中调式没有问题,都可以使用。但当把程序带有数字签名的方式发布后,手机上安装该app,点击程序图标打开,马上就退出。


02-18 10:20:54.378: INFO/ActivityManager(166): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.test/.Test_MainActivity bnds=[237,370][357,505] } from pid 253

02-18 10:20:54.480: DEBUG/PhoneWindow(253): couldn't save which view has focus because the focused view com.android.launcher2.CellScreen@4057b110 has no id.
02-18 10:20:54.484: INFO/ActivityManager(166): Start proc com.test for activity com.test/.Test_MainActivity: pid=2589 uid=10043 gids={1006, 1015, 3003}
02-18 10:20:54.539: DEBUG/dalvikvm(2589): Debugger has detached; object registry had 1 entries
02-18 10:20:54.605: DEBUG/dalvikvm(2589): Trying to load lib /data/data/com.test/lib/libBMapApiEngine.so 0x40515200
02-18 10:20:54.816: DEBUG/dalvikvm(2589): Added shared lib /data/data/com.test/lib/libBMapApiEngine.so 0x40515200
02-18 10:20:54.820: DEBUG/dalvikvm(2589): No JNI_OnLoad found in /data/data/com.test/lib/libBMapApiEngine.so 0x40515200, skipping init
02-18 10:20:54.839: ERROR/sdkVersion(2589): 10
02-18 10:20:54.871: DEBUG/dalvikvm(2589): GetMethodID: method not found: Lcom/baidu/mapapi/Mj;.J_GetDevInfo:(I)Landroid/os/Bundle;
02-18 10:20:54.871: INFO/DEBUG(2565): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-18 10:20:54.871: INFO/DEBUG(2565): Build fingerprint: 'samsung/libra_galaxysmtd/galaxysmtd:2.3.7/MIUI/2.4.13:userdebug/test-keys'
02-18 10:20:54.871: INFO/DEBUG(2565): pid: 2589, tid: 2589  >>> com.test <<<
02-18 10:20:54.871: INFO/DEBUG(2565): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000004
02-18 10:20:54.871: INFO/DEBUG(2565):  r0 405347d0  r1 00000000  r2 00000000  r3 00000000
02-18 10:20:54.871: INFO/DEBUG(2565):  r4 0000ce68  r5 0000abe0  r6 40535220  r7 00000000
02-18 10:20:54.871: INFO/DEBUG(2565):  r8 be979fbc  r9 4214ccec  10 4214ccd4  fp aca9f374
02-18 10:20:54.871: INFO/DEBUG(2565):  ip aca9dd68  sp be979f80  lr aca4694f  pc aca66074  cpsr 60010030
02-18 10:20:54.871: INFO/DEBUG(2565):  d0  0000000040009990  d1  4214ee6c4214ee02
02-18 10:20:54.871: INFO/DEBUG(2565):  d2  421503304214ee15  d3  4214ef3c4214ef42
02-18 10:20:54.871: INFO/DEBUG(2565):  d4  421501284214ef70  d5  421501904215015c
02-18 10:20:54.871: INFO/DEBUG(2565):  d6  421501f8421501c4  d7  421502604215022c
02-18 10:20:54.871: INFO/DEBUG(2565):  d8  0000000000000000  d9  0000000000000000
02-18 10:20:54.871: INFO/DEBUG(2565):  d10 0000000000000000  d11 0000000000000000
02-18 10:20:54.871: INFO/DEBUG(2565):  d12 0000000000000000  d13 0000000000000000
02-18 10:20:54.871: INFO/DEBUG(2565):  d14 0000000000000000  d15 0000000000000000
02-18 10:20:54.871: INFO/DEBUG(2565):  d16 000000004053aa98  d17 3fe999999999999a
02-18 10:20:54.871: INFO/DEBUG(2565):  d18 42eccefa43de3400  d19 3fbc71c71c71c71c
02-18 10:20:54.871: INFO/DEBUG(2565):  d20 4008000000000000  d21 3fd99a27ad32ddf5
02-18 10:20:54.871: INFO/DEBUG(2565):  d22 3fd24998d6307188  d23 3fcc7288e957b53b
02-18 10:20:54.871: INFO/DEBUG(2565):  d24 3fc74721cad6b0ed  d25 3fc39a09d078c69f
02-18 10:20:54.871: INFO/DEBUG(2565):  d26 0000000000000000  d27 0000000000000000
02-18 10:20:54.871: INFO/DEBUG(2565):  d28 0000000000000000  d29 0000000000000000
02-18 10:20:54.871: INFO/DEBUG(2565):  d30 0000000000000000  d31 0000000000000000
02-18 10:20:54.871: INFO/DEBUG(2565):  scr 60000010
02-18 10:20:54.968: INFO/DEBUG(2565):          #00  pc 00066074  /system/lib/libdvm.so (dvmDumpObject)
02-18 10:20:54.968: INFO/DEBUG(2565):          #01  lr aca4694f  /system/lib/libdvm.so
02-18 10:20:54.968: INFO/DEBUG(2565): code around pc:
02-18 10:20:54.968: INFO/DEBUG(2565): aca66054 0002c5e7 fffffe84 0001db65 0002c551 
02-18 10:20:54.972: INFO/DEBUG(2565): aca66064 0002c570 0001db43 0002c542 0001db41 
02-18 10:20:54.972: INFO/DEBUG(2565): aca66074 4603684a f012b570 d12d0202 6a046808 
02-18 10:20:54.972: INFO/DEBUG(2565): aca66084 7f00f414 6f9cbf18 e017d106 f8556fdd 
02-18 10:20:54.972: INFO/DEBUG(2565): aca66094 42855032 3201d009 dbf742a2 480fd105 
02-18 10:20:54.976: INFO/DEBUG(2565): code around lr:
02-18 10:20:54.976: INFO/DEBUG(2565): aca4692c bf00bdf0 41ffe92d 460e6904 21014617 
02-18 10:20:54.980: INFO/DEBUG(2565): aca4693c 46204605 f0064698 4639f9f5 f01f6830 
02-18 10:20:54.980: INFO/DEBUG(2565): aca4694c 4607fb93 4620b928 f0062107 4638f9eb 
02-18 10:20:54.980: INFO/DEBUG(2565): aca4695c a802e015 90002301 46204639 f8cd4632 
02-18 10:20:54.980: INFO/DEBUG(2565): aca4696c f0138004 6ae3f8e7 4628b923 f7fd9902 
02-18 10:20:54.980: INFO/DEBUG(2565): stack:
02-18 10:20:54.980: INFO/DEBUG(2565):     be979f40  4053aa98  
02-18 10:20:54.980: INFO/DEBUG(2565):     be979f44  0000ce68  
02-18 10:20:54.980: INFO/DEBUG(2565):     be979f48  0000ce68  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f4c  0000ce68  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f50  acaa4d48  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f54  aca3f92f  /system/lib/libdvm.so
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f58  4053a918  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f5c  804e6b74  /datadata/com.test/lib/libBMapApiEngine.so
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f60  00000000  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f64  804e6b74  /datadata/com.test/lib/libBMapApiEngine.so
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f68  aca83a45  /system/lib/libdvm.so
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f6c  00000000  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f70  0000ce68  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f74  0000abe0  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f78  df002777  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f7c  e3a070ad  
02-18 10:20:54.984: INFO/DEBUG(2565): #00 be979f80  0000abe0  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f84  40535220  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f88  00000000  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f8c  be979fbc  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f90  0000abe0  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f94  804e9b44  
02-18 10:20:54.984: INFO/DEBUG(2565):     be979f98  804bf38c  /datadata/com.test/lib/libBMapApiEngine.so
02-18 10:20:54.988: INFO/DEBUG(2565):     be979f9c  be979fe0  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fa0  405347d0  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fa4  804bf3b0  /datadata/com.test/lib/libBMapApiEngine.so
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fa8  804e9b44  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fac  be979fbc  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fb0  be979fe0  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fb4  804beecc  /datadata/com.test/lib/libBMapApiEngine.so
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fb8  00000000  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fbc  00000004  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fc0  4214ccd4  
02-18 10:20:54.988: INFO/DEBUG(2565):     be979fc4  0000abe0  
02-18 10:20:55.695: INFO/BootReceiver(166): Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
02-18 10:20:55.703: DEBUG/Zygote(114): Process 2589 terminated by signal (11)

02-18 10:20:55.710: INFO/ActivityManager(166): Process com.test (pid 2589) has died.


以上问题已经不是第一次遇到,由于没有记录下解决办法,今天再次栽在了上面。

在发布时添加以下代码

-libraryjars E:/soft/adt-bundle-windows-x86_64-20130729/sdk/tools/support/annotations.jar
-libraryjars E:/code/java/workspace/test/libs/core.jar
-libraryjars E:/code/java/workspace/test/libs/baidumapapi.jar
-libraryjars E:/code/java/workspace/test/libs/android-support-v4.jar


-keep class android.support.v4.**
-dontwarn android.support.v4.**
-keep class com.baidu.mapapi.** { *; }
-dontwarn com.baidu.mapapi.**
-keep class com.google.zxing.** { *; }
-dontwarn com.google.zxing.**

若没有用到对应的相应的包,则不添加对应的包。

若有另外现象,则参照对应的log信息,增减对应的包。

你可能感兴趣的:(手机上程序打开一闪,自动关闭)