question on Android with version 1.8.0-alpha

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
hongjunyu128
Posts: 18
Joined: Tue Sep 04, 2012 8:27 am

question on Android with version 1.8.0-alpha

Post by hongjunyu128 »

i have compiled source to a static library that named libIrrAndroid.a
then i use it as prebuilt static library,try to run example no.8.

it looks like well with opengl-es1.0,i turn it to opengl-es2.0,then thread is end,log like this:
09-24 09:50:57.518: I/System.out(23850): waiting for debugger to settle...
09-24 09:50:57.719: I/System.out(23850): waiting for debugger to settle...
09-24 09:50:57.919: I/System.out(23850): waiting for debugger to settle...
09-24 09:50:58.119: I/System.out(23850): waiting for debugger to settle...
09-24 09:50:58.329: I/System.out(23850): waiting for debugger to settle...
09-24 09:50:58.529: I/System.out(23850): waiting for debugger to settle...
09-24 09:50:58.730: I/System.out(23850): waiting for debugger to settle...
09-24 09:50:58.920: I/System.out(23850): debugger has settled (1402)
09-24 09:50:59.040: I/threaded_app(23850): Creating: 0x2930e0
09-24 09:50:59.040: I/threaded_app(23850): Config: mcc=460 mnc=2 lang=zh cnt=CN orien=2 touch=3 dens=240 keys=1 nav=2 keysHid=3 navHid=0 sdk=10 size=2 long=2 modetype=1 modenight=1
09-24 09:50:59.040: I/threaded_app(23850): Start: 0x2930e0
09-24 09:50:59.040: E/Irrlicht(23850): Irrlicht Engine version 1.8.0-alpha
09-24 09:50:59.040: E/Irrlicht(23850): CIrrDeviceAndroid::CIrrDeviceAndroid
09-24 09:50:59.050: E/Irrlicht(23850): Waiting for Android activity window to be created.
09-24 09:50:59.050: I/threaded_app(23850): activityState=10
09-24 09:50:59.050: I/threaded_app(23850): Resume: 0x2930e0
09-24 09:50:59.050: E/Irrlicht(23850): Unhandled android command: 10
09-24 09:50:59.050: I/threaded_app(23850): activityState=11
09-24 09:50:59.050: I/threaded_app(23850): InputQueueCreated: 0x2930e0 -- 0x294440
09-24 09:50:59.050: E/Irrlicht(23850): Android command APP_CMD_RESUME
09-24 09:50:59.060: I/threaded_app(23850): APP_CMD_INPUT_CHANGED
09-24 09:50:59.060: I/threaded_app(23850): Attaching input queue to looper
09-24 09:50:59.060: E/Irrlicht(23850): Unhandled android command: 0
09-24 09:50:59.080: I/threaded_app(23850): NativeWindowCreated: 0x2930e0 -- 0x294860
09-24 09:50:59.080: I/threaded_app(23850): APP_CMD_INIT_WINDOW
09-24 09:50:59.080: I/threaded_app(23850): WindowFocusChanged: 0x2930e0 -- 1
09-24 09:50:59.090: E/Irrlicht(23850): Android command APP_CMD_INIT_WINDOW
09-24 09:50:59.090: E/Irrlicht(23850): Android command APP_CMD_GAINED_FOCUS
09-24 09:50:59.090: E/Irrlicht(23850): CIrrDeviceAndroid::createDriver
09-24 09:50:59.090: E/Irrlicht(23850): Getting OpenGL-ES2 display.
09-24 09:50:59.210: E/Irrlicht(23850): EglDisplay initialized. Egl version 1.4
09-24 09:50:59.210: E/Irrlicht(23850):  Creating EglSurface with nativeWindow...
09-24 09:50:59.210: E/libEGL(23850): eglCreateWindowSurface  format=4

i change phone with lower profile like MOTO-MB525,logcat like this:

Code: Select all

09-24 09:43:07.999: E/AndroidRuntime(10569): FATAL EXCEPTION: main
09-24 09:43:07.999: E/AndroidRuntime(10569): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.irrlicht.SFX/android.app.NativeActivity}: java.lang.IllegalArgumentException: Unable to find native library: SFX
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1664)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1680)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.os.Handler.dispatchMessage(Handler.java:99)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.os.Looper.loop(Looper.java:130)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.ActivityThread.main(ActivityThread.java:3703)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at java.lang.reflect.Method.invokeNative(Native Method)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at java.lang.reflect.Method.invoke(Method.java:507)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at dalvik.system.NativeStart.main(Native Method)
09-24 09:43:07.999: E/AndroidRuntime(10569): Caused by: java.lang.IllegalArgumentException: Unable to find native library: SFX
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.NativeActivity.onCreate(NativeActivity.java:187)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-24 09:43:07.999: E/AndroidRuntime(10569):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1628)
09-24 09:43:07.999: E/AndroidRuntime(10569):    ... 11 more
 
i have no idea,can anybody help me?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: question on Android with version 1.8.0-alpha

Post by hybrid »

IIRC, you need at least Android 2.3 to run native apps. Otherwise you have to provide a full Java application wrapper, which only uses Irrlicht and other things through methods. Which means that you have to wrap the main method into some local function and call that from Java.
hongjunyu128
Posts: 18
Joined: Tue Sep 04, 2012 8:27 am

Re: question on Android with version 1.8.0-alpha

Post by hongjunyu128 »

hybrid wrote:IIRC, you need at least Android 2.3 to run native apps. Otherwise you have to provide a full Java application wrapper, which only uses Irrlicht and other things through methods. Which means that you have to wrap the main method into some local function and call that from Java.
MOTO-MB525 is Android 2.3.7,the other is also over 2.3.
But when i use opengl-es 2.0,it is end.i am aware of it that may be question~ "IrrlichtDevice *device = createDeviceEx(p);"
it seems like that can not createDeviceEx,i have not edited the main.cpp.
where is the problem?
Post Reply