3

When I load cardboard.jar + libprotobuf-java-2.6-nano.jar (Version 0.5.6) on Intel(x86) based devices, I get a java.lang.UnsatisfiedLinkError: Couldn't load vrtoolkit from loader dalvik.system.PathClassLoader which causes: InflateException error (not able to load xml).

If I switch to the old library, cardboard.jar + libprotobuf-java-2.3-nano.jar
Then, Intel based devices work.

V.0.5.6
0.5.6

Old Version
enter image description here

It seems like v.0.5.6(latest) has lib.armeabi-v7a but no general lib.armeabi or lib.x86 SO files.

I am guessing this might be why it is causing the problem.

Is there solution? Other then use the old library?

  • Intel devices I tested: Samsung Tab 3 10.1, Asus Zenfone 5
jclova
  • 5,466
  • 16
  • 52
  • 78
  • I can confirm the same behavior. – Jorrit Oct 02 '15 at 21:29
  • Also Galaxy S6 (ARMv8-A) doesn't work either. – jclova Oct 03 '15 at 18:12
  • Works fine on the S6 for me. – Jorrit Oct 04 '15 at 10:01
  • @Jorrit are you sure? Galaxy S6 uses ARMv8-A (64 bit CPU). However, I don't see 'arm64-v8a' folder included inside the cardboard.jar – jclova Oct 06 '15 at 23:17
  • arm64-v8a can execute armeabi-v7a. Yes, I am sure, since I do most of my development testing on an S6. If you are included other libraries in your project that (only?) come with arm64-v8a binaries, perhaps that causes the issue? Try stripping them out and including only armeabi-v7a libraries. – Jorrit Oct 07 '15 at 09:48
  • @Jorrit I found the solution for me. abiFilters did it. Hope it solves your issue too. – jclova Nov 15 '15 at 04:53
  • jclova, could you specify whether your project include other libraries that come with arm64-v8a binaries? Could you specify if you have this problem with the sample code? or with your own project? As Jorrit said arm64-v8a phones can execute armv7 binaries, so this shouldn't be a problem if the only native code comes from the cardboard SDK. – dcoz Dec 14 '15 at 23:08
  • 1
    @dcoz Yes, it is the problem with my project and it contains other JNI libraries that has arm64-v8a binaries. I dont have the isssue with the sample code. – jclova Dec 17 '15 at 13:52
  • @jclova, that makes sense, thanks for confirming! – dcoz Dec 17 '15 at 20:37

1 Answers1

3

I found the solution.

On build.gradle file, add filters only include "armeabi-v7a" & "armeabi" so files.

buildTypes {
    release {
        ndk {
            abiFilters "armeabi-v7a", "armeabi" // includes ARM SO files only, so no x86 SO file
        }
    }
    debug {
        ndk {
            abiFilters "armeabi-v7a", "armeabi" // includes ARM SO files only, so no x86 SO file
        }
    }
}

I checked Note 5, S6 working (64 bits) and checked Intel devices working as well.

On Intel devices, looking around the 360 scene using gyroscope doesn't work but that's another issue. [Edit]: Turns out the Intel devices which I tested didn't have the gyroscope sensor :)

jclova
  • 5,466
  • 16
  • 52
  • 78