(NDK) I think I need some help...

A project to port LÖVE to Android handhelds
Locked
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

(NDK) I think I need some help...

Post by utunnels » Sun Nov 18, 2012 3:57 pm

I got it compiled, somehow (except I was not using eclipse).
However, when I tried to run it (either no-game screen or .love), it crashed. :ehem:


Part of the logcat message:

Code: Select all

E/Adreno200-ES20( 3582): <qgl2DrvAPI_glUseProgram:1318>: **** 3582: glUseProgram(3)

E/Adreno200-ES20( 3582): <qgl2DrvAPI_glUseProgram:1318>: **** 3582: glUseProgram(6)

D/memalloc(  128): /dev/pmem: Allocated buffer base:0x419c8000 size:1536000 offset:7905280 fd:33

D/memalloc( 3582): /dev/pmem: Mapped buffer base:0x522dc000 size:9441280 offset:7905280 fd:57

I/ActivityManager(  374): START {cmp=net.schattenkind.nativelove/.LoveNative} from pid 3582

W/SignalStrength(  554): SignalStrength before validate=SignalStrength: 20 0 -1 -1 -1 -1 -1 99 -32767 -32767 -32767 -32767 cdma

W/SignalStrength(  554): SignalStrength after validate=SignalStrength: 20 0 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 cdma

I/WindowManager(  374): SCREENLAYOUT_SIZE (1:small, 2:normal, 3:large, 4:xlarge) 2

E/Adreno200-ES20( 3582): <qgl2DrvAPI_glUseProgram:1318>: **** 3582: glUseProgram(3)

E/Adreno200-ES20( 3582): <qgl2DrvAPI_glUseProgram:1318>: **** 3582: glUseProgram(6)

W/dalvikvm( 3582): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lnet/schattenkind/nativelove/LoveJNI;

W/dalvikvm( 3582): threadid=1: thread exiting with uncaught exception (group=0x40dcd1f8)

E/AndroidRuntime( 3582): FATAL EXCEPTION: main

E/AndroidRuntime( 3582): java.lang.ExceptionInInitializerError

E/AndroidRuntime( 3582): 	at net.schattenkind.nativelove.LoveNative.onCreate(LoveNative.java:54)

E/AndroidRuntime( 3582): 	at android.app.Activity.performCreate(Activity.java:4519)

E/AndroidRuntime( 3582): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)

E/AndroidRuntime( 3582): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)

E/AndroidRuntime( 3582): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

E/AndroidRuntime( 3582): 	at android.app.ActivityThread.access$600(ActivityThread.java:123)

E/AndroidRuntime( 3582): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

E/AndroidRuntime( 3582): 	at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 3582): 	at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 3582): 	at android.app.ActivityThread.main(ActivityThread.java:4464)

E/AndroidRuntime( 3582): 	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 3582): 	at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 3582): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:822)

E/AndroidRuntime( 3582): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:589)

E/AndroidRuntime( 3582): 	at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 3582): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]:   129 cannot locate '__gnu_thumb1_case_uhi'...

E/AndroidRuntime( 3582): 

E/AndroidRuntime( 3582): 	at java.lang.Runtime.loadLibrary(Runtime.java:370)

E/AndroidRuntime( 3582): 	at java.lang.System.loadLibrary(System.java:535)

E/AndroidRuntime( 3582): 	at net.schattenkind.nativelove.LoveJNI.<clinit>(LoveJNI.java:16)

E/AndroidRuntime( 3582): 	... 15 more

W/ActivityManager(  374):   Force finishing activity net.schattenkind.nativelove/.LoveNative

W/ActivityManager(  374):   Force finishing activity net.schattenkind.nativelove/.LoveLauncher
I have API 15 installed (though the NDK has only up to 14).
So do I still need to insatll API 8 as it was mentioned in that building topic? viewtopic.php?f=11&t=8415

dudeabot
Prole
Posts: 17
Joined: Tue Nov 13, 2012 2:28 am

Re: (NDK) I think I need some help...

Post by dudeabot » Sun Nov 18, 2012 10:15 pm

hi man, maybe you are confusing android SDK with NDK =), download android NDK R8 (r8 not r8b, i havent tested with r8c) and compile with it! its a bug with r8b that needs investigation.

if you want you can download older versions of the android SDK, but you should be fine with only the latest . but a change is required to project.properties to update lke this:

target=android-15

dudeabot
Prole
Posts: 17
Joined: Tue Nov 13, 2012 2:28 am

Re: (NDK) I think I need some help...

Post by dudeabot » Sun Nov 18, 2012 10:18 pm

you can test with my libs if you want:

http://gjteam.com.br/libsLove.zip

put them inside love-native-android\libs\armeabi

hope it helps

utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: (NDK) I think I need some help...

Post by utunnels » Mon Nov 19, 2012 1:00 am

Thank you, I'll try them asap when I get home.

Project.properties already has target=android-15.

But it seemed ndk failed to find it, I guess that was because I started in jni folder but project.properties was in the project folder? So it used android-3 as default, which did't have certain glse libs. Later I modified certain ndk script so it could compile using android-14 as sysroot(I could simply use cygwin without changing anything, so it appeared to be a bug of windows version).

I'll try r8 or r8c these days anyway.

utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: (NDK) I think I need some help...

Post by utunnels » Mon Nov 19, 2012 11:46 am

dudeabot wrote:you can test with my libs if you want:

http://gjteam.com.br/libsLove.zip

put them inside love-native-android\libs\armeabi

hope it helps
Yeah your libs work perfectly.

---------------

Edit *

I also tried r8 and r8c. Fortunately r8 works, though r8c still has some sort of bug (or perhaps I just haven't figured out how to configure it correctly).
Finally I can play with the code for a while. :ultraglee:

Locked

Who is online

Users browsing this forum: No registered users and 2 guests