关于用Eclipse运行项目后模拟器一闪而过的问题。

貌似是比较容易遇到的问题,模拟器一闪而过,控制台报错如下:


Running with storage root SonyEricsson_S700_Emu
ALERT: java/lang/ClassFormatError: Bad version information.
Method…………: 101682d0 ‘com/sun/midp/midlet/MIDletState.createMIDlet (static)’
Stack Chunk…….: 187f478
Frame Pointer…..: 187f51c
Current IP……..: 101f6a2f = 101f6a21 + offset 14
Previous Frame….: 187f4e4
Previous IP…….: 101d57a4 (offset 52)
Frame size……..: 7 (1 arguments, 6 local variables)
Argument[0]…….: 187dee4
Local[1]……….: 187f4e4
Local[2]……….: 101d57a1
Local[3]……….: 187e448
Local[4]……….: 101680c8
Local[5]……….: 187f478
Local[6]……….: 0
Operand[1]……..: 187dee4
Method…………: 10151268 ‘com/sun/midp/midlet/Scheduler.schedule (virtual)’
Stack Chunk…….: 187f478
Frame Pointer…..: 187f4e4
Current IP……..: 101d57a4 = 101d5770 + offset 52
Previous Frame….: 187f4b0
Previous IP…….: 101e1e4d (offset 28)
Frame size……..: 7 (2 arguments, 5 local variables)
Argument[0]…….: 187e614
Argument[1]…….: 186b67c
Local[2]……….: 187dee4
Local[3]……….: 187f4b0
Local[4]……….: 101e1e49
Local[5]……….: 187f4c4
Local[6]……….: 10151188
Operand[1]……..: 187e614
Method…………: 1015a81c ‘com/sun/midp/main/Main.runLocalClass (static)’
Stack Chunk…….: 187f478
Frame Pointer…..: 187f4b0
Current IP……..: 101e1e4d = 101e1e31 + offset 28
Previous Frame….: 187f48c
Previous IP…….: 101e18c4 (offset 116)
Frame size……..: 3 (1 arguments, 2 local variables)
Argument[0]…….: 187ebf8
Local[1]……….: 186b67c
Local[2]……….: 187f48c
Method…………: 1015a77c ‘com/sun/midp/main/Main.main (static)’
Stack Chunk…….: 187f478
Frame Pointer…..: 187f48c
Current IP……..: 101e18c4 = 101e1850 + offset 116
Previous Frame….: 0
Previous IP…….: 1
Frame size……..: 3 (1 arguments, 2 local variables)
Argument[0]…….: 187f764
Local[1]……….: 187ebf8
Local[2]……….: 187df28
VM status:
Instruction pointer.: 101f6a2f (offset within invoking method: 14)
Next instruction….: 0x4c
Frame pointer…….: 187f51c
Local pointer…….: 187f500
Stack size……….: 256; sp: 187f534; ranges: 187f480-187f680;187f1b0-187f3b0;
Contents of the current stack frame:
187f500: 187dee4 (lp)
187f504: 187f4e4
187f508: 101d57a1
187f50c: 187e448
187f510: 101680c8
187f514: 187f478
187f518: 0
187f51c: 187f4e4 (fp)
187f520: 101d57a4
187f524: 187f4fc
187f528: 101682d0
187f52c: 187f478
187f530: 0 (end of frame)
187f534: 187dee4 (sp)
Execution stack contains 184 items:
187f764
187ebf8
187df28
01
187f47c
1015a77c
187f478
0187ebf8
186b67c
187f48c
187f48c
101e18c4
187f4a0
1015a81c
187f478
0187e614
186b67c
187dee4
187f4b0
101e1e49
187f4c4
10151188
187f4b0
101e1e4d
187f4c4
10151268
187f478
0187e614
187dee4
187f4e4
101d57a1
187e448
101680c8
187f478
0187f4e4
101d57a4
187f4fc
101682d0
187f478
0187dee4
Execution completed.
0 bytecodes executed
0 thread switches
780 classes in the system (including system classes)
0 dynamic objects allocated (0 bytes)
0 garbage collections (0 bytes collected)
Execution completed.
0 bytecodes executed
0 thread switches
780 classes in the system (including system classes)
0 dynamic objects allocated (0 bytes)
0 garbage collections (0 bytes collected)
其实是编译器的版本兼容性设置导致,只要在项目属性中将Compiler compliance Level 降到1.4就可以了。

博主友情提示:

如在您的评论中需要提及如QQ号、微信号、电子邮件地址或其他隐私敏感信息,欢迎通过>>博主专用加密工具v2<<加密后发布,原文只有博主可以看到。