开发者

SimpleXML works on emulator, not on Android device

开发者 https://www.devze.com 2023-04-08 18:30 出处:网络
I\'m using Simple 2.6.1 on an Android project for serialize some complex xml files. I use Eclipse and followed the procedure described on the project site (Simple XML in Android 1.5 and Up):

I'm using Simple 2.6.1 on an Android project for serialize some complex xml files. I use Eclipse and followed the procedure described on the project site (Simple XML in Android 1.5 and Up):

1) created the "libs" folder on the project root 2) put simple-xml-2.6.1.jar in the "libs" folder 3) added the jar to the build path 4) selected for export on the build path

All works fine when I run the application on the android emulator. But when I install the application on the device I get a crash at the time of serialization.

What's wrong?

P.S. I'm developing with android api level 8 (android 2.2)

Here's logcat:

I/WindowManager( 3002):   CREATE SURFACE Surface(name=Please wait..., identity=2186, mNativeSurface=0) IN SESSION android.view.SurfaceSession@40966108: pid=13036 format=-2 flags=0x0 / Window{40b8a978 Please wait... paused=false}

I/WindowManager( 3002):   CREATE SURFACE Surface(name=data5.android/data5.android.activity.CompileForm, identity=2187, mNativeSurface=0) IN SESSION android.view.SurfaceSession@40966108: pid=13036 format=-1 flags=0x0 / Window{40ce66e8 data5.android/data5.android.activity.CompileForm paused=false}

I/dalvikvm(13036): Could not find method javax.xml.stream.XMLInputFactory.newInstance, referenced from method org.simpleframework.xml.stream.StreamProvider.<init>

W/dalvikvm(13036): VFY: unable to resolve static method 1532: Ljavax/xml/stream/XMLInputFactory;.newInstance ()Ljavax/xml/stream/XMLInputFactory;

D/dalvikvm(13036): VFY: replacing opcode 0x71 at 0x0003

D/dalvikvm(13036): VFY: dead code 0x0006-0009 in Lorg/simpleframework/xml/stream/StreamProvider;.<init> ()V

D/dalvikvm(13036): GC_CONCURRENT freed 120K, 50% free 2855K/5639K, external 857K/1168K, paused 4ms+4ms

W/dalvikvm(13036): VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLEventReader;)

W/dalvikvm(13036): VFY: unable to find class referenced in signature (Ljavax/xml/stream/XMLEventReader;)

I/dalvikvm(13036): Could not find method javax.xml.stream.XMLInputFactory.createXMLEventReader, referenced from method org.simpleframework.xml.stream.StreamProvider.provide

W/dalvikvm(13036): VFY: unable to resolve virtual method 1530: Ljavax/xml/stream/XMLInputFactory;.createXMLEventReader (Ljava/io/InputStream;)Ljavax/xml/stream/XMLEventReader;

D/dalvikvm(13036): VFY: replacing opcode 0x6e at 0x0002

D/dalvikvm(13036): VFY: dead code 0x0005-000a in Lorg/simpleframework/xml/stream/StreamProvider;.provide (Ljava/io/InputStream;)Lorg/simpleframework/xml/stream/EventReader;

I/dalvikvm(13036): Could not find method javax.xml.stream.XMLInputFactory.createXMLEventReader, referenced from method org.simpleframework.xml.stream.StreamProvider.provide

W/dalvikvm(13036): VFY: unable to resolve virtual method 1531: Ljavax/xml/stream/XMLInputFactory;.createXMLEventReader (Ljava/io/Reader;)Ljavax/xml/stream/XMLEventReader;

D/dalvikvm(13036): VFY: replacing opcode 0x6e at 0x0002

D/dalvikvm(13036): VFY: dead code 0x0005-000a in Lorg/simpleframework/xml/stream/StreamProvider;.provide (Ljava/io/Reader;)Lorg/simpleframework/xml/stream/EventReader;

D/dalvikvm(13036): GC_CONCURRENT freed 453K, 52% free 2890K/5959K, external 834K/1168K, paused 1ms+2ms

I/ActivityManager( 3002): Displayed data5.android/.activity.CompileForm: +409ms

W/WindowManager( 3002): Window Window{40ada338 data5.android/data5.android.activity.StartForm paused=false} destroyed surface Surface(name=data5.android/data5.android.activity.StartForm, identity=-1, mNativeSurface=0), session Session{40cbdc28 uid 10226}

W/SurfaceFlinger( 3002): data5.android/data5.android.activity.StartFor开发者_运维问答m[2184] is not removed from mLayerMap

D/dalvikvm(13036): GC_CONCURRENT freed 512K, 52% free 2907K/6023K, external 834K/1168K, paused 1ms+3ms

D/dalvikvm(13036): GC_CONCURRENT freed 509K, 52% free 2909K/6023K, external 834K/1168K, paused 2ms+2ms

D/PowerManagerService( 3002): onSensorChanged: light value: 1000

D/dalvikvm(13036): GC_CONCURRENT freed 553K, 53% free 2917K/6087K, external 834K/1168K, paused 1ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 461K, 52% free 2954K/6087K, external 834K/1168K, paused 2ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 449K, 52% free 2968K/6087K, external 834K/1168K, paused 2ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 514K, 52% free 2957K/6087K, external 834K/1168K, paused 1ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 502K, 52% free 2967K/6087K, external 834K/1168K, paused 2ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 506K, 52% free 2972K/6087K, external 834K/1168K, paused 1ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 574K, 52% free 2972K/6151K, external 834K/1168K, paused 2ms+2ms

E/lights  ( 3002): write_int: path /sys/devices/virtual/misc/melfas_touchkey/brightness, value 2

W/PowerManagerService( 3002): Timer 0x7->0x3|0x0

I/PowerManagerService( 3002): Ulight 7->3|0

D/PowerManagerService( 3002): setLightBrightness : mButtonLight : 0

D/dalvikvm(13036): GC_CONCURRENT freed 489K, 52% free 2995K/6151K, external 834K/1168K, paused 1ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 520K, 52% free 2986K/6151K, external 834K/1168K, paused 2ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 508K, 52% free 2990K/6151K, external 834K/1168K, paused 2ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 512K, 52% free 2990K/6151K, external 834K/1168K, paused 2ms+2ms

D/dalvikvm(13036): GC_CONCURRENT freed 510K, 52% free 2992K/6151K, external 834K/1168K, paused 1ms+2ms

W/dalvikvm(13036): threadid=12: thread exiting with uncaught exception (group=0x4001e578)


Change java compiler version into higher

0

精彩评论

暂无评论...
验证码 换一张
取 消