Author Topic: Help, please! JPCT-AE + aclipse + android = ERROR  (Read 4474 times)

Offline Roboteck

  • byte
  • *
  • Posts: 4
    • View Profile
Help, please! JPCT-AE + aclipse + android = ERROR
« on: June 29, 2011, 03:09:06 pm »
Hi!

My name is Roma, I Russian, excuse me for my bad English, I write by means of the translator.

I write on PHP and ActionScript. There was a necessity to write 3D application for android. I have selected Java (it is very similar on actionscript), Eclipsse and JPCT (it is necessary 3D).

At me it turns out to do applications without usage JPCT but as soon as I add in the code something from JPCT, application hangs up.



Code: [Select]
package com.test;

import android.app.Activity;
import android.os.Bundle;
import com.threed.jpct.World;

public class Test_JPCT_2Activity extends Activity {
    private World world = null;
   
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        world = new World();
    }
}

The error disappears, when I make comments on this line

Code: [Select]
//world = new World();

Offline Nemetz

  • int
  • **
  • Posts: 53
    • View Profile
Re: Help, please! JPCT-AE + aclipse + android = ERROR
« Reply #1 on: June 29, 2011, 03:33:38 pm »
Post here please Logcat log....

Offline Roboteck

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Help, please! JPCT-AE + aclipse + android = ERROR
« Reply #2 on: June 29, 2011, 04:06:41 pm »
Code: [Select]
06-29 14:04:29.760: DEBUG/AndroidRuntime(562): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-29 14:04:29.760: DEBUG/AndroidRuntime(562): CheckJNI is ON
06-29 14:04:32.458: DEBUG/AndroidRuntime(562): Calling main entry com.android.commands.pm.Pm
06-29 14:04:33.166: DEBUG/dalvikvm(239): GC_EXPLICIT freed 4K, 54% free 2544K/5511K, external 716K/1038K, paused 223ms
06-29 14:04:33.207: WARN/ActivityManager(60): No content provider found for:
06-29 14:04:33.506: WARN/ActivityManager(60): No content provider found for:
06-29 14:04:33.566: DEBUG/PackageParser(60): Scanning package: /data/app/vmdl228293121.tmp
06-29 14:04:33.986: INFO/PackageManager(60): Removing non-system package:com.test
06-29 14:04:33.996: INFO/ActivityManager(60): Force stopping package com.test uid=10034
06-29 14:04:34.309: DEBUG/PackageManager(60): Scanning package com.test
06-29 14:04:34.316: INFO/PackageManager(60): Package com.test codePath changed from /data/app/com.test-2.apk to /data/app/com.test-1.apk; Retaining data and using new
06-29 14:04:34.327: INFO/PackageManager(60): Unpacking native libraries for /data/app/com.test-1.apk
06-29 14:04:34.522: DEBUG/installd(34): DexInv: --- BEGIN '/data/app/com.test-1.apk' ---
06-29 14:04:34.611: DEBUG/dalvikvm(572): DexOpt: load 59ms, verify+opt 20ms
06-29 14:04:34.611: DEBUG/installd(34): DexInv: --- END '/data/app/com.test-1.apk' (success) ---
06-29 14:04:34.611: WARN/PackageManager(60): Code path for pkg : com.test changing from /data/app/com.test-2.apk to /data/app/com.test-1.apk
06-29 14:04:34.611: WARN/PackageManager(60): Resource path for pkg : com.test changing from /data/app/com.test-2.apk to /data/app/com.test-1.apk
06-29 14:04:34.611: DEBUG/PackageManager(60):   Activities: com.test.Test_JPCT_2Activity
06-29 14:04:34.611: DEBUG/dalvikvm(60): GC_FOR_MALLOC freed 582K, 46% free 4186K/7623K, external 1488K/1828K, paused 112ms
06-29 14:04:34.611: INFO/ActivityManager(60): Force stopping package com.test uid=10034
06-29 14:04:34.611: INFO/installd(34): move /data/dalvik-cache/data@app@com.test-1.apk@classes.dex -> /data/dalvik-cache/data@app@com.test-1.apk@classes.dex
06-29 14:04:34.611: DEBUG/PackageManager(60): New package installed in /data/app/com.test-1.apk
06-29 14:04:34.611: INFO/ActivityManager(60): Force stopping package com.test uid=10034
06-29 14:04:34.611: DEBUG/dalvikvm(131): GC_EXPLICIT freed 15K, 50% free 2828K/5639K, external 2422K/2996K, paused 262ms
06-29 14:04:34.611: WARN/RecognitionManagerService(60): no available voice recognition services found
06-29 14:04:34.611: DEBUG/dalvikvm(60): GC_EXPLICIT freed 362K, 46% free 4145K/7623K, external 1488K/1828K, paused 210ms
06-29 14:04:34.611: DEBUG/dalvikvm(187): GC_EXPLICIT freed 12K, 52% free 2754K/5703K, external 716K/1038K, paused 1460ms
06-29 14:04:34.611: INFO/installd(34): unlink /data/dalvik-cache/data@app@com.test-2.apk@classes.dex
06-29 14:04:34.611: DEBUG/AndroidRuntime(562): Shutting down VM
06-29 14:04:34.611: DEBUG/dalvikvm(562): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 3ms+2ms
06-29 14:04:34.611: INFO/AndroidRuntime(562): NOTE: attach of thread 'Binder Thread #4' failed
06-29 14:04:34.611: DEBUG/dalvikvm(562): Debugger has detached; object registry had 1 entries
06-29 14:04:39.687: DEBUG/AndroidRuntime(577): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
06-29 14:04:39.687: DEBUG/AndroidRuntime(577): CheckJNI is ON
06-29 14:04:41.117: DEBUG/AndroidRuntime(577): Calling main entry com.android.commands.am.Am
06-29 14:04:41.257: INFO/ActivityManager(60): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.test/.Test_JPCT_2Activity } from pid 577
06-29 14:04:41.497: DEBUG/AndroidRuntime(577): Shutting down VM
06-29 14:04:41.567: INFO/AndroidRuntime(577): NOTE: attach of thread 'Binder Thread #3' failed
06-29 14:04:41.627: DEBUG/dalvikvm(577): GC_CONCURRENT freed 102K, 69% free 320K/1024K, external 0K/0K, paused 3ms+2ms
06-29 14:04:41.647: DEBUG/jdwp(577): Got wake-up signal, bailing out of select
06-29 14:04:41.647: DEBUG/dalvikvm(577): Debugger has detached; object registry had 1 entries
06-29 14:04:41.997: WARN/ActivityManager(60): Activity pause timeout for HistoryRecord{40657628 com.android.launcher/com.android.launcher2.Launcher}
06-29 14:04:42.647: INFO/ActivityManager(60): Start proc com.test for activity com.test/.Test_JPCT_2Activity: pid=587 uid=10034 gids={}
06-29 14:04:45.716: ERROR/dalvikvm(587): Could not find class 'com.threed.jpct.World', referenced from method com.test.Test_JPCT_2Activity.onCreate
06-29 14:04:45.716: WARN/dalvikvm(587): VFY: unable to resolve new-instance 9 (Lcom/threed/jpct/World;) in Lcom/test/Test_JPCT_2Activity;
06-29 14:04:45.736: DEBUG/dalvikvm(587): VFY: replacing opcode 0x22 at 0x0008
06-29 14:04:45.736: DEBUG/dalvikvm(587): VFY: dead code 0x000a-000f in Lcom/test/Test_JPCT_2Activity;.onCreate (Landroid/os/Bundle;)V
06-29 14:04:46.046: DEBUG/AndroidRuntime(587): Shutting down VM
06-29 14:04:46.046: WARN/dalvikvm(587): threadid=1: thread exiting with uncaught exception (group=0x40015560)
06-29 14:04:46.090: ERROR/AndroidRuntime(587): FATAL EXCEPTION: main
06-29 14:04:46.090: ERROR/AndroidRuntime(587): java.lang.NoClassDefFoundError: com.threed.jpct.World
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at com.test.Test_JPCT_2Activity.onCreate(Test_JPCT_2Activity.java:14)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.os.Looper.loop(Looper.java:123)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at android.app.ActivityThread.main(ActivityThread.java:3683)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at java.lang.reflect.Method.invokeNative(Native Method)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at java.lang.reflect.Method.invoke(Method.java:507)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-29 14:04:46.090: ERROR/AndroidRuntime(587):     at dalvik.system.NativeStart.main(Native Method)
06-29 14:04:46.157: WARN/ActivityManager(60):   Force finishing activity com.test/.Test_JPCT_2Activity
06-29 14:04:46.686: WARN/ActivityManager(60): Activity pause timeout for HistoryRecord{4053e3a0 com.test/.Test_JPCT_2Activity}
06-29 14:04:53.106: DEBUG/dalvikvm(239): GC_EXPLICIT freed 6K, 54% free 2544K/5511K, external 716K/1038K, paused 82ms
06-29 14:04:58.069: WARN/ActivityManager(60): Activity destroy timeout for HistoryRecord{4053e3a0 com.test/.Test_JPCT_2Activity}
06-29 14:04:58.446: DEBUG/dalvikvm(311): GC_EXPLICIT freed 2K, 54% free 2539K/5511K, external 716K/1038K, paused 371ms
06-29 14:05:05.207: DEBUG/dalvikvm(320): GC_EXPLICIT freed 4K, 55% free 2593K/5703K, external 716K/1038K, paused 117ms

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Help, please! JPCT-AE + aclipse + android = ERROR
« Reply #3 on: June 29, 2011, 04:25:18 pm »
Somehow, your packaging is not correct. It can't find the World class, which is actually part of the jpct-ae.jar . Check your build path in Eclipse...

Offline Roboteck

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Help, please! JPCT-AE + aclipse + android = ERROR
« Reply #4 on: June 29, 2011, 04:49:29 pm »
I specified build path in

Right click on project - Build Path - Add Libraries - User Library


Can be not truly adjusted at me JPCT, look, please

Offline Roboteck

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Help, please! JPCT-AE + aclipse + android = ERROR
« Reply #5 on: June 29, 2011, 07:20:58 pm »


At me here such adjustments, but application it is not launched

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Help, please! JPCT-AE + aclipse + android = ERROR
« Reply #6 on: June 29, 2011, 08:23:33 pm »
Personally, i've never used that "user library" thing for an Android project...so i tried it to see what happens...and it fails in the same way as it does for you. I'm not sure how to setup an Android project correctly when using a user library, but i usually add my jars in the properties' libraries tab as "external jar" and that works fine.