Steve C.
Steve C.

Reputation: 1353

Why does jar library work in Eclipse but not Android Studio?

I have a jar library (specifically Rajawali v0.9) that works perfectly in Eclipse when using and compiling my project but Android Studio gives a ton of errors when trying to compile. Why is that and is there a way to bypass lint on specific jar library?

EDIT

Had to remove the manifest via gradle because of some mismatch but here is the logcat when I try to run the app:

    java.lang.UnsatisfiedLinkError: Couldn't load bufferutil from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.pspdemocenter.graffitilwp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.pspdemocenter.graffitilwp-1, /vendor/lib, /system/lib]]]: findLibrary returned null
    at java.lang.Runtime.loadLibrary(Runtime.java:358)
    at java.lang.System.loadLibrary(System.java:526)
    at rajawali.util.BufferUtil.<clinit>(BufferUtil.java:16)
    at rajawali.Geometry3D.setVertices(Geometry3D.java:506)
    at rajawali.Geometry3D.setVertices(Geometry3D.java:494)
    at rajawali.Geometry3D.setData(Geometry3D.java:259)
    at rajawali.BaseObject3D.setData(BaseObject3D.java:177)
    at rajawali.BaseObject3D.setData(BaseObject3D.java:154)
    at rajawali.BaseObject3D.setData(BaseObject3D.java:171)
    at rajawali.BaseObject3D.<init>(BaseObject3D.java:114)
    at com.pspdemocenter.graffitilwp.MyRenderer.LoadSerializedMesh(MyRenderer.java:65)
    at com.pspdemocenter.graffitilwp.MyRenderer.initScene(MyRenderer.java:119)
    at rajawali.renderer.RajawaliRenderer.onSurfaceCreated(RajawaliRenderer.java:362)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1505)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1244)

Upvotes: 0

Views: 237

Answers (1)

user6021276
user6021276

Reputation:

You can also use jar library in android studio like that :-

Step 1 : Now under your app folder you should see libs, if you don't see it, then create it .

Step 2 : Drag & Drop the .jar file here, you may be get a prompt "This file does not belong to the project", just click OK Button .

Step 3 : Now you should see the jar file under libs folder, right click on the jar file and select "Add as library", Click OK for prompt "Create Library"

Step 4 : Now this jar has been added.

enter image description here

Upvotes: 1

Related Questions