aRRGH! Android studio ... linker error

I have spent the last 4 hours trying to get a test app running on a new nexus 7 tablet. I have managed to pre-build the libraries using this post (How to link prebuilt Cocos2D X C++ library to Android Studio project?) but it won’t allow me to have this in the settings.gradle file. If it take them out gradle seems happy.

externalNativeBuild {
ndkBuild {
path “jni/Android.mk”
}
}

but and when I try to run on the device I get this:
W/System: ClassLoader referenced unknown path: /data/app/org.cocos2dx.ProjectName-1/lib/arm
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.cocos2dx.ProjectName, PID: 29374
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/data/app/org.cocos2dx.ProjectName-1/base.apk”],nativeLibraryDirectories=[/data/app/org.cocos2dx.ProjectName-1/lib/arm, /vendor/lib, /system/lib]]] couldn’t find “libMyGame.so”
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:248)
at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:264)

I’m really lost, can anyone offer any advice?

1 Like