libGDX with Android in RubyMotion

121 views
Skip to first unread message

Shaurya Arora

unread,
Mar 4, 2015, 9:03:19 PM3/4/15
to rubym...@googlegroups.com
I'm trying to get a basic libGDX Android project up and running using RubyMotion.

Here's the problem that I am running into: in addition to .jar files, I need to import some "lib" files (of the format .so) for libGDX to work. Now, I know that jar files need to placed in the vendor directory and referenced in the Rakefile. I wasn't sure where to put the .so lib files so I put them in the vendor directory also. When I ran "rake device," everything happened fine, except when the app started, it immediately crashed throwing a java.lang.ExceptionInInitializerError. Further down the error stack, I saw these lines:

Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'gdx' for target: Linux, 32-bit
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.yourcompany.gdxsample-2/base.apk"],nativeLibraryDirectories=[/data/app/com.yourcompany.gdxsample-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libgdx.so"

Based on the last line of the error message above, I moved the libGDX .so files into /vendor/lib (they reside inside "armeabi" and "armeabi-v7a" folders), but still no luck.

My makefile has the following lines for the vdx jar files:

app.vendor_project :jar => "vendor/gdx.jar"
app.vendor_project :jar => "vendor/gdx-backend-android.jar"

..but it doesn't have anything for the .so lib files. I don't know how to do that. 

Any help would be much appreciated. Thanks!

Reply all
Reply to author
Forward
0 new messages