在运行jPCT的第一个例子HelloWorld-AE时碰到错误的解决办法

1 篇文章 0 订阅
1 篇文章 0 订阅

在运行jPCT的第一个例子HelloWorld-AE时,你可能也会遇到跟我同样的问题,截屏如下:

LogCat的trace:

07-28 17:31:54.944: D/ddm-heap(657): Got feature list request
07-28 17:31:55.184: E/dalvikvm(657): Could not find class 'com.threed.jpct.RGBColor', referenced from method com.threed.jpct.example.HelloWorld.<init>
07-28 17:31:55.184: W/dalvikvm(657): VFY: unable to resolve new-instance 23 (Lcom/threed/jpct/RGBColor;) in Lcom/threed/jpct/example/HelloWorld;
07-28 17:31:55.184: D/dalvikvm(657): VFY: replacing opcode 0x22 at 0x000f
07-28 17:31:55.184: D/dalvikvm(657): Making a copy of Lcom/threed/jpct/example/HelloWorld;.<init> code (96 bytes)
07-28 17:31:55.184: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/FrameBuffer;)
07-28 17:31:55.184: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/FrameBuffer;)
07-28 17:31:55.224: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/RGBColor;)
07-28 17:31:55.224: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/World;)
07-28 17:31:55.224: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/World;)
07-28 17:31:55.224: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Light;)
07-28 17:31:55.224: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Light;)
07-28 17:31:55.224: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Object3D;)
07-28 17:31:55.224: W/dalvikvm(657): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Object3D;)
07-28 17:31:55.264: I/dalvikvm(657): Could not find method com.threed.jpct.Logger.log, referenced from method com.threed.jpct.example.HelloWorld.copy
07-28 17:31:55.264: W/dalvikvm(657): VFY: unable to resolve static method 26: Lcom/threed/jpct/Logger;.log (Ljava/lang/String;)V
07-28 17:31:55.264: D/dalvikvm(657): VFY: replacing opcode 0x71 at 0x0002
07-28 17:31:55.264: D/dalvikvm(657): Making a copy of Lcom/threed/jpct/example/HelloWorld;.copy code (112 bytes)
07-28 17:31:55.264: I/dalvikvm(657): Could not find method com.threed.jpct.Logger.log, referenced from method com.threed.jpct.example.HelloWorld.onCreate
07-28 17:31:55.264: W/dalvikvm(657): VFY: unable to resolve static method 26: Lcom/threed/jpct/Logger;.log (Ljava/lang/String;)V
07-28 17:31:55.264: D/dalvikvm(657): VFY: replacing opcode 0x71 at 0x0002
07-28 17:31:55.264: D/dalvikvm(657): Making a copy of Lcom/threed/jpct/example/HelloWorld;.onCreate code (132 bytes)
07-28 17:31:55.264: D/AndroidRuntime(657): Shutting down VM
07-28 17:31:55.264: W/dalvikvm(657): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
07-28 17:31:55.264: E/AndroidRuntime(657): Uncaught handler: thread main exiting due to uncaught exception
07-28 17:31:55.334: E/AndroidRuntime(657): java.lang.NoClassDefFoundError: com.threed.jpct.RGBColor
07-28 17:31:55.334: E/AndroidRuntime(657):  at com.threed.jpct.example.HelloWorld.<init>(HelloWorld.java:46)
07-28 17:31:55.334: E/AndroidRuntime(657):  at java.lang.Class.newInstanceImpl(Native Method)
07-28 17:31:55.334: E/AndroidRuntime(657):  at java.lang.Class.newInstance(Class.java:1479)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.os.Looper.loop(Looper.java:123)
07-28 17:31:55.334: E/AndroidRuntime(657):  at android.app.ActivityThread.main(ActivityThread.java:4363)
07-28 17:31:55.334: E/AndroidRuntime(657):  at java.lang.reflect.Method.invokeNative(Native Method)
07-28 17:31:55.334: E/AndroidRuntime(657):  at java.lang.reflect.Method.invoke(Method.java:521)
07-28 17:31:55.334: E/AndroidRuntime(657):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-28 17:31:55.334: E/AndroidRuntime(657):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-28 17:31:55.334: E/AndroidRuntime(657):  at dalvik.system.NativeStart.main(Native Method)
07-28 17:31:55.334: I/dalvikvm(657): threadid=7: reacting to signal 3
07-28 17:31:55.334: E/dalvikvm(657): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
07-28 17:32:50.525: E/dalvikvm(684): Could not find class 'com.threed.jpct.RGBColor', referenced from method com.threed.jpct.example.HelloWorld.<init>
07-28 17:32:50.535: W/dalvikvm(684): VFY: unable to resolve new-instance 23 (Lcom/threed/jpct/RGBColor;) in Lcom/threed/jpct/example/HelloWorld;
07-28 17:32:50.535: D/dalvikvm(684): VFY: replacing opcode 0x22 at 0x000f
07-28 17:32:50.535: D/dalvikvm(684): Making a copy of Lcom/threed/jpct/example/HelloWorld;.<init> code (96 bytes)
07-28 17:32:50.535: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/FrameBuffer;)
07-28 17:32:50.545: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/FrameBuffer;)
07-28 17:32:50.545: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/RGBColor;)
07-28 17:32:50.545: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/World;)
07-28 17:32:50.555: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/World;)
07-28 17:32:50.565: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Light;)
07-28 17:32:50.565: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Light;)
07-28 17:32:50.565: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Object3D;)
07-28 17:32:50.565: W/dalvikvm(684): VFY: unable to find class referenced in signature (Lcom/threed/jpct/Object3D;)
07-28 17:32:50.565: I/dalvikvm(684): Could not find method com.threed.jpct.Logger.log, referenced from method com.threed.jpct.example.HelloWorld.copy
07-28 17:32:50.565: W/dalvikvm(684): VFY: unable to resolve static method 26: Lcom/threed/jpct/Logger;.log (Ljava/lang/String;)V
07-28 17:32:50.565: D/dalvikvm(684): VFY: replacing opcode 0x71 at 0x0002
07-28 17:32:50.565: D/dalvikvm(684): Making a copy of Lcom/threed/jpct/example/HelloWorld;.copy code (112 bytes)
07-28 17:32:50.577: I/dalvikvm(684): Could not find method com.threed.jpct.Logger.log, referenced from method com.threed.jpct.example.HelloWorld.onCreate
07-28 17:32:50.577: W/dalvikvm(684): VFY: unable to resolve static method 26: Lcom/threed/jpct/Logger;.log (Ljava/lang/String;)V
07-28 17:32:50.577: D/dalvikvm(684): VFY: replacing opcode 0x71 at 0x0002
07-28 17:32:50.577: D/dalvikvm(684): Making a copy of Lcom/threed/jpct/example/HelloWorld;.onCreate code (132 bytes)
07-28 17:32:50.585: D/AndroidRuntime(684): Shutting down VM
07-28 17:32:50.585: W/dalvikvm(684): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
07-28 17:32:50.585: E/AndroidRuntime(684): Uncaught handler: thread main exiting due to uncaught exception
07-28 17:32:50.605: E/AndroidRuntime(684): java.lang.NoClassDefFoundError: com.threed.jpct.RGBColor
07-28 17:32:50.605: E/AndroidRuntime(684):  at com.threed.jpct.example.HelloWorld.<init>(HelloWorld.java:46)
07-28 17:32:50.605: E/AndroidRuntime(684):  at java.lang.Class.newInstanceImpl(Native Method)
07-28 17:32:50.605: E/AndroidRuntime(684):  at java.lang.Class.newInstance(Class.java:1479)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.os.Looper.loop(Looper.java:123)
07-28 17:32:50.605: E/AndroidRuntime(684):  at android.app.ActivityThread.main(ActivityThread.java:4363)
07-28 17:32:50.605: E/AndroidRuntime(684):  at java.lang.reflect.Method.invokeNative(Native Method)
07-28 17:32:50.605: E/AndroidRuntime(684):  at java.lang.reflect.Method.invoke(Method.java:521)
07-28 17:32:50.605: E/AndroidRuntime(684):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-28 17:32:50.605: E/AndroidRuntime(684):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-28 17:32:50.605: E/AndroidRuntime(684):  at dalvik.system.NativeStart.main(Native Method)
07-28 17:32:50.615: I/dalvikvm(684): threadid=7: reacting to signal 3
07-28 17:32:50.615: E/dalvikvm(684): Unable to open stack trace file '/data/anr/traces.txt': Permission denied

解决思路如下:

1. 从错误日志可以看出关键的错误原因是RGBColor类的定义找不到,且通过查看apk文件的属性,发现只有13,240  bytes。而实际上单jPCT的jar就有292,328  bytes,因此怀疑安装包没打全,少东西了。

2.打开BuildPath配置,勾选上jpct_ae.jar,再次运行,OK了。

3.打完收功。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值