help TestJavaScript!


#1

Win7 x86 Android.
I build c++ project of android and invoke build_native.sh by cgwin , install device. It is ok!

Eclipse import .android. I invoke build_native.sh by cgwin at .android\build_native.sh , nothing happens.
I copy org.cocos2dx.lib into src and run appliction,
error at:* System.loadLibrary(“testjavascript”);*
Does that mean:Library build fail, and loading null.

04-18 16:06:46.765: E/AndroidRuntime(30432): FATAL EXCEPTION: main
04-18 16:06:46.765: E/AndroidRuntime(30432): java.lang.ExceptionInInitializerError
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.Class.newInstanceImpl(Native Method)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.Class.newInstance(Class.java:1319)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.Instrumentation.newActivity(Instrumentation.java:1057)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2015)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.access$600(ActivityThread.java:140)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.os.Handler.dispatchMessage(Handler.java:99)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.os.Looper.loop(Looper.java:137)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.main(ActivityThread.java:4898)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.reflect.Method.invokeNative(Native Method)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.reflect.Method.invoke(Method.java:511)
04-18 16:06:46.765: E/AndroidRuntime(30432): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
04-18 16:06:46.765: E/AndroidRuntime(30432): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
04-18 16:06:46.765: E/AndroidRuntime(30432): at dalvik.system.NativeStart.main(Native Method)
04-18 16:06:46.765: E/AndroidRuntime(30432): Caused by: java.lang.UnsatisfiedLinkError: Couldn’t load testjavascript: findLibrary returned null
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.Runtime.loadLibrary(Runtime.java:365)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.System.loadLibrary(System.java:535)
04-18 16:06:46.765: E/AndroidRuntime(30432): at org.cocos2dx.testjavascript.TestJavascript.(TestJavascript.java:37)
04-18 16:06:46.765: E/AndroidRuntime(30432): … 15 more

Are there some guide and document about javascript developing cocos2d-x?


#2

俊 曹 wrote:

Win7 x86 Android.
I build c++ project of android and invoke build_native.sh by cgwin , install device. It is ok!
>
Eclipse import JavascriptTestJavascriptproj.android. I invoke build_native.sh by cgwin at JavascriptTestJavascriptproj.androiduild_native.sh , nothing happens.
I copy org.cocos2dx.lib into src and run appliction,
error at:* System.loadLibrary(“testjavascript”);*
Does that mean:Library build fail, and loading null.
>
04-18 16:06:46.765: E/AndroidRuntime(30432): FATAL EXCEPTION: main
04-18 16:06:46.765: E/AndroidRuntime(30432): java.lang.ExceptionInInitializerError
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.Class.newInstanceImpl(Native Method)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.Class.newInstance(Class.java:1319)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.Instrumentation.newActivity(Instrumentation.java:1057)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2015)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.access$600(ActivityThread.java:140)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.os.Handler.dispatchMessage(Handler.java:99)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.os.Looper.loop(Looper.java:137)
04-18 16:06:46.765: E/AndroidRuntime(30432): at android.app.ActivityThread.main(ActivityThread.java:4898)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.reflect.Method.invokeNative(Native Method)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.reflect.Method.invoke(Method.java:511)
04-18 16:06:46.765: E/AndroidRuntime(30432): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
04-18 16:06:46.765: E/AndroidRuntime(30432): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
04-18 16:06:46.765: E/AndroidRuntime(30432): at dalvik.system.NativeStart.main(Native Method)
04-18 16:06:46.765: E/AndroidRuntime(30432): Caused by: java.lang.UnsatisfiedLinkError: Couldn’t load testjavascript: findLibrary returned null
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.Runtime.loadLibrary(Runtime.java:365)
04-18 16:06:46.765: E/AndroidRuntime(30432): at java.lang.System.loadLibrary(System.java:535)
04-18 16:06:46.765: E/AndroidRuntime(30432): at org.cocos2dx.testjavascript.TestJavascript.(TestJavascript.java:37)
04-18 16:06:46.765: E/AndroidRuntime(30432): … 15 more
>
Are there some guide and document about javascript developing cocos2d-x?