首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

求解释,程序运行的时候莫名奇妙的退出了?该怎么解决

2012-02-23 
求解释,程序运行的时候莫名奇妙的退出了???我的代码如下:Java codepublic class Graphics extends Activit

求解释,程序运行的时候莫名奇妙的退出了???
我的代码如下:

Java code
public class Graphics extends Activity {        @Override    public void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(new GraphicsView(this));    }    static public class GraphicsView extends View {        Paint cPaint =new Paint();        Path circle = new Path();        private static final String QUOTE = "New is the time for all"                + "good men to come to the aid of their country.";                public GraphicsView(Context context) {            super(context);            Canvas canvas = new Canvas();            onDraw(canvas);        }        @Override        protected void onDraw(Canvas canvas) {            circle.addCircle(150, 150, 100, Direction.CW);            canvas.drawPath(circle, cPaint);            canvas.drawTextOnPath(QUOTE, circle, 0, 20, cPaint);        }    }}


程序不报错但是在运行时莫名奇妙的退出了??
日志如下:

10-25 14:31:01.699: INFO/ARMAssembler(61): generated scanline__00000177:03515104_00001A01_00000000 [ 73 ipp] (98 ins) at [0x463760:0x4638e8] in 1175641 ns
10-25 14:31:01.939: INFO/ActivityManager(61): Displayed activity com.android.launcher/.Launcher: 63765 ms (total 63765 ms)
10-25 14:31:04.919: DEBUG/dalvikvm(111): GC freed 2185 objects / 116328 bytes in 121ms
10-25 14:31:07.079: INFO/ActivityManager(61): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.wiscom.pzq.Graphics/.Graphics }
10-25 14:31:07.269: INFO/ActivityManager(61): Start proc com.wiscom.pzq.Graphics for activity com.wiscom.pzq.Graphics/.Graphics: pid=235 uid=10036 gids={}
10-25 14:31:07.719: DEBUG/ddm-heap(235): Got feature list request
10-25 14:31:07.919: INFO/ARMAssembler(61): generated scanline__00000177:03515104_00000001_00000000 [ 73 ipp] (95 ins) at [0x3dad98:0x3daf14] in 2720350 ns
10-25 14:31:08.079: INFO/ARMAssembler(61): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x3daf18:0x3db024] in 539182 ns
10-25 14:31:08.479: INFO/DEBUG(28): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-25 14:31:08.479: INFO/DEBUG(28): Build fingerprint: 'generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys'
10-25 14:31:08.479: INFO/DEBUG(28): pid: 235, tid: 235 >>> com.wiscom.pzq.Graphics <<<
10-25 14:31:08.479: INFO/DEBUG(28): signal 11 (SIGSEGV), fault addr 00000028
10-25 14:31:08.479: INFO/DEBUG(28): r0 00000000 r1 0012a684 r2 00000000 r3 0012a684
10-25 14:31:08.479: INFO/DEBUG(28): r4 0012a718 r5 0012a6c4 r6 00000000 r7 00000000
10-25 14:31:08.489: INFO/DEBUG(28): r8 beaeb870 r9 00000000 10 beaeb8d0 fp 0012a650
10-25 14:31:08.489: INFO/DEBUG(28): ip 00000000 sp beaeb7d8 lr 00000000 pc ac065288 cpsr 60000010
10-25 14:31:08.629: INFO/DEBUG(28): #00 pc 00065288 /system/lib/libskia.so
10-25 14:31:08.639: INFO/DEBUG(28): #01 pc 00066b14 /system/lib/libskia.so
10-25 14:31:08.649: INFO/DEBUG(28): #02 pc 00064084 /system/lib/libskia.so
10-25 14:31:08.649: INFO/DEBUG(28): #03 pc 00040e08 /system/lib/libandroid_runtime.so
10-25 14:31:08.659: INFO/DEBUG(28): #04 pc 0000f1f4 /system/lib/libdvm.so
10-25 14:31:08.659: INFO/DEBUG(28): #05 pc 00040dc6 /system/lib/libandroid_runtime.so
10-25 14:31:08.659: INFO/DEBUG(28): code around pc:
10-25 14:31:08.659: INFO/DEBUG(28): ac065278 e1d4e2f4 e1d472f6 e5946004 e197200e 
10-25 14:31:08.670: INFO/DEBUG(28): ac065288 e5969028 e596a024 0a00002e e59db00c 
10-25 14:31:08.670: INFO/DEBUG(28): ac065298 e2848028 e1a0c008 e8bb000f e8ac000f 
10-25 14:31:08.670: INFO/DEBUG(28): code around lr:
10-25 14:31:08.670: INFO/DEBUG(28): stack:
10-25 14:31:08.670: INFO/DEBUG(28): beaeb798 44e910d0 /dev/ashmem/mspace/dalvik-heap/2 (deleted)


10-25 14:31:08.670: INFO/DEBUG(28): beaeb79c 00000000  
10-25 14:31:08.670: INFO/DEBUG(28): beaeb7a0 40050b70 /dev/ashmem/mspace/dalvik-heap/zygote/0 (deleted)
10-25 14:31:08.670: INFO/DEBUG(28): beaeb7a4 ad0560bb /system/lib/libdvm.so
10-25 14:31:08.670: INFO/DEBUG(28): beaeb7a8 00010a50 [heap]
10-25 14:31:08.670: INFO/DEBUG(28): beaeb7ac 41847818  
10-25 14:31:08.670: INFO/DEBUG(28): beaeb7b0 afe3bb74  
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7b4 afe0f3b0 /system/lib/libc.so
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7b8 00000000  
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7bc afe0f2c0 /system/lib/libc.so
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7c0 afe3b9bc  
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7c4 000001b8  
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7c8 00002bb4  
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7cc 000000dc  
10-25 14:31:08.679: INFO/DEBUG(28): beaeb7d0 df002777  
10-25 14:31:08.699: INFO/DEBUG(28): beaeb7d4 e3a070ad  
10-25 14:31:08.709: INFO/DEBUG(28): #00 beaeb7d8 ad00f380 /system/lib/libdvm.so
10-25 14:31:08.709: INFO/DEBUG(28): beaeb7dc ad057cf9 /system/lib/libdvm.so
10-25 14:31:08.709: INFO/DEBUG(28): beaeb7e0 00000000  
10-25 14:31:08.709: INFO/DEBUG(28): beaeb7e4 0012a69c [heap]
10-25 14:31:08.709: INFO/DEBUG(28): beaeb7e8 44e91410 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-25 14:31:08.709: INFO/DEBUG(28): beaeb7ec 00000000  
10-25 14:31:08.719: INFO/DEBUG(28): beaeb7f0 00000000  
10-25 14:31:08.719: INFO/DEBUG(28): beaeb7f4 0012a650 [heap]
10-25 14:31:08.719: INFO/DEBUG(28): beaeb7f8 beaeb870 [stack]
10-25 14:31:08.719: INFO/DEBUG(28): beaeb7fc 001338e0 [heap]
10-25 14:31:08.719: INFO/DEBUG(28): beaeb800 0013fdd0 [heap]
10-25 14:31:08.719: INFO/DEBUG(28): beaeb804 40050b70 /dev/ashmem/mspace/dalvik-heap/zygote/0 (deleted)
10-25 14:31:08.729: INFO/DEBUG(28): beaeb808 beaeb870 [stack]
10-25 14:31:08.729: INFO/DEBUG(28): beaeb80c ad0545a5 /system/lib/libdvm.so
10-25 14:31:08.729: INFO/DEBUG(28): beaeb810 0000bd00 [heap]
10-25 14:31:08.729: INFO/DEBUG(28): beaeb814 41f9095e /data/dalvik-cache/system@framework@core.jar@classes.dex
10-25 14:31:08.729: INFO/DEBUG(28): beaeb818 afe3bb74  
10-25 14:31:08.729: INFO/DEBUG(28): beaeb81c 00100484 [heap]
10-25 14:31:08.729: INFO/DEBUG(28): beaeb820 00000000  
10-25 14:31:08.739: INFO/DEBUG(28): beaeb824 00133700 [heap]
10-25 14:31:08.739: INFO/DEBUG(28): beaeb828 00000088  
10-25 14:31:08.739: INFO/DEBUG(28): beaeb82c 00134bf0 [heap]
10-25 14:31:08.739: INFO/DEBUG(28): beaeb830 44e91138 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-25 14:31:08.739: INFO/DEBUG(28): beaeb834 beaeb870 [stack]
10-25 14:31:08.739: INFO/DEBUG(28): beaeb838 00000000  
10-25 14:31:08.739: INFO/DEBUG(28): beaeb83c beaeb8d0 [stack]
10-25 14:31:08.739: INFO/DEBUG(28): beaeb840 0012a650 [heap]
10-25 14:31:08.739: INFO/DEBUG(28): beaeb844 ac066b18 /system/lib/libskia.so
10-25 14:31:08.739: INFO/DEBUG(28): #01 beaeb848 00000000  
10-25 14:31:08.749: INFO/DEBUG(28): beaeb84c ad01988c /system/lib/libdvm.so
10-25 14:31:08.749: INFO/DEBUG(28): beaeb850 0000bd00 [heap]
10-25 14:31:08.749: INFO/DEBUG(28): beaeb854 ad019830 /system/lib/libdvm.so
10-25 14:31:08.749: INFO/DEBUG(28): beaeb858 beaeb868 [stack]
10-25 14:31:08.769: INFO/DEBUG(28): beaeb85c 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb860 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb864 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb868 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb86c 00000000  


10-25 14:31:08.769: INFO/DEBUG(28): beaeb870 44e91108 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-25 14:31:08.769: INFO/DEBUG(28): beaeb874 42ab4cb6 /data/dalvik-cache/system@framework@framework.jar@classes.dex
10-25 14:31:08.769: INFO/DEBUG(28): beaeb878 44e91108 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-25 14:31:08.769: INFO/DEBUG(28): beaeb87c 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb880 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb884 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb888 0012a650 [heap]
10-25 14:31:08.769: INFO/DEBUG(28): beaeb88c ad07ff50 /system/lib/libdvm.so
10-25 14:31:08.769: INFO/DEBUG(28): beaeb890 0000bd00 [heap]
10-25 14:31:08.769: INFO/DEBUG(28): beaeb894 44e91108 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-25 14:31:08.769: INFO/DEBUG(28): beaeb898 00000000  
10-25 14:31:08.769: INFO/DEBUG(28): beaeb89c ad040a7b /system/lib/libdvm.so
10-25 14:31:08.769: INFO/DEBUG(28): beaeb8a0 ad07ff50 /system/lib/libdvm.so
10-25 14:31:08.769: INFO/DEBUG(28): beaeb8a4 0012a650 [heap]
10-25 14:31:08.769: INFO/DEBUG(28): beaeb8a8 beaeb8d0 [stack]
10-25 14:31:08.779: INFO/DEBUG(28): beaeb8ac 00000088  
10-25 14:31:08.779: INFO/DEBUG(28): beaeb8b0 44e91138 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-25 14:31:08.779: INFO/DEBUG(28): beaeb8b4 00134bf0 [heap]
10-25 14:31:08.779: INFO/DEBUG(28): beaeb8b8 4186bc2c  
10-25 14:31:08.779: INFO/DEBUG(28): beaeb8bc 4186bc18  
10-25 14:31:08.779: INFO/DEBUG(28): beaeb8c0 00000000  
10-25 14:31:08.779: INFO/DEBUG(28): beaeb8c4 ac064088 /system/lib/libskia.so
10-25 14:31:09.649: DEBUG/Zygote(30): Process 235 terminated by signal (11)
10-25 14:31:09.660: INFO/ActivityManager(61): Process Graphics (pid 235) has died.10-25 14:31:09.709: INFO/UsageStats(61): Unexpected resume of com.android.launcher while already resumed in com.wiscom.pzq.Graphics
10-25 14:31:10.019: WARN/InputManagerService(61): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44e15c18


谁能帮忙看看啊,感激不尽!!!

[解决办法]
android.os.Build.FINGERPRINT: A string that uniquely identifies this build. It SHOULD be reasonably human-readable. It MUST follow this template:

$(BRAND)/$(PRODUCT)/$(DEVICE)/$(BOARD):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS)

For example: acme/mydevice/generic/generic:2.1-update1/ERC77/3359:userdebug/test-keys

The fingerprint MUST NOT include spaces. If other fields included in the template above have spaces, they SHOULD be replaced with the ASCII underscore ("_") character in the fingerprint.

热点排行