1

I have a unity project work with two devices one is android 5.1 and another is android 4.0. Right now I need to add googleVR to my unity project.

My unity app can be built and installed on android 5.1, but not the one with android 4.0, I know cardboard unity sdk require api above 19. But I just want to ship one apk file, even if the vr part doesn't work. I need it can be installed on android 4.0.

The apk can't be installed on android 4.0(api 15) says it requires api 19 or above. After research, I found that in the AndroidManifest file, the minimum api is set to be 19, I change it to 15, and build failed with log " but library uses minSdkVersion='16'".

I think there must be one file specify the api level in the android sdk not the unity sdk. I know the .aar libs of the unity sdk are compiled from the cardboard android sdk project, the only way is to modify the original android sdk reset the api verion and compile. But after cloning the source code of android sdk, I can't find where they set the minimum api, and I am not sure how to build their android sdk code. Have anyone did that before?

Can Anyone Help???? Tons of Thanks!!!

godlzr
  • 11
  • 5

1 Answers1

1

The error you are getting is most likely from another manifest in plugins/android/gvr_android_common. You can open that package and change 16 to 15 and it'll build. For me it gives no errors in Unity but logcat shows that it can't find some class/methods (DisplaySynchronizer) and it wont start the application.

  • 3
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you [earn](http://meta.stackexchange.com/questions/146472/what-is-the-best-way-to-increase-my-reputation-and-privileges) sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). If you have a related but different question, [ask a new question](http://stackoverflow.com/questions/ask). – Gustavo Morales Jul 12 '16 at 13:05