Gideros : Android (Old) for Eclipse - Exception java.lang.UnsatisfiedLinkError: Couldn't load luasocket from loader
Hi All, i'm trying Gideros mobile platform then i've got struggling on Android (Old), when you're export project it's seem to be fine but after import to eclipse, an error come in to chase your skill, so i've take a time to understand an error and i can beat them now with simple tricky.
(choose Android(Old), template Eclipse)
(click Done)
I've test via Android 4.4.2 only, You can try new project from sample or demo project, i've chosen 3d cube project for test first, don't include third party plugin at this time. Choose export "Android (Old)", then i've choose option for eclipse (ADT) then click "ok", ignore all error about project, the last thing you've got "Export done".
(remove "3D-Cube" at first line)
Open your eclipse (ADT) then import project "File > Import... > Android > Existing Android Code Into Workspace" then browse to project and click "Finish". An error occur suddenly, goto root project then "3D-Cube > res > values", i've recommend open "strings.xml" first and remove word "3D-Cube" at first line. I don't understand why this simply bug happen in export function via xml form.
(remove android:banner="@drawable/banner")
After first error gone so the next is "AndroidManifest.xml", open it, at line "application" you can comment out or remove it now, i'm remove it because i just want to be fast publish on device then remove this statement 'android:banner="@drawable/banner"', an error disappear leave only warning, it's ok, i'm really sure you'll not take an effect for testing.
Try "project > clean...", it's look good no error then connect your android device, don't worry you don't need an internet for this testing and test publish project by right-click on root "3D-Cube" choose "Run As > Android Application" then App Crash and FATAL EXCEPTION happen, but no error why???
The real problem is after export project Gideros generate unnecessary code or missing included static libs for that code. Open "DCubeActivity.java" under "3D-Cube > src" and comment out all of this.
// System.loadLibrary("luasocket");
// System.loadLibrary("lfs");
// System.loadLibrary("lsqlite3");
// System.loadLibrary("json");
// System.loadLibrary("bitop");
and comment out this function because i've use Android 4.4.2, not necessary for test.
/*
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults) {
}
String permissions[], int[] grantResults) {
}
*/
Because all above you don't have it under "3D-Cube > libs > armeabi", "3D-Cube > libs > armeabi-v7a", "3D-Cube > libs > x86". Then "project > clean..." and choose "Run As > Android Application" again.
(sample run application)
Your first test project should be run successful on device, i've change device from Android 4.4.2 to Android 6.0 it's still work nice because this project not need permission to be grant. For iOS i already test it, no problem like Android.









Comments
Post a Comment