Search Unity

How to use daydream with target sdk version 23

Discussion in 'Daydream' started by kellerm1, Feb 21, 2018.

  1. kellerm1

    kellerm1

    Joined:
    Feb 22, 2017
    Posts:
    4
    Hello everyone,

    I need to compile a Unity project with Daydream and the Android target sdk version 23 (see here for details). However, the Daydream support in Unity 5.6.5f1 requires a target sdk version 24.

    Is there an older version of Unity in which I could use Daydream and the target sdk version 23?

    The Unity 2017 documentation reads that the minimum api level is 24 while the Unity 5.6.0 documentation reads:

    Target API Level should be set to API level 21 or higher for Cardboard and Daydream.
    So it should be possible on Unity 5.6.0

    However, when trying to compile a project on Unity 5.6.0f3 with target sdk version 23, I still get the following error :
    Daydream requires a minimum api level of 24. You have selected 21.

    Moreover, I saw an article where a project was compiled with target sdk version 23 and daydream on Unity 5.6.0p4 so I am confused.. I doubt that installing 5.6.0p4 instead of 5.6.0f3 will change anything.

    At this point, I don't get why i need a minimum api level of 24 in Unity 5.6 while the manual reads api level 21...

    Thanks for your help
     
  2. reedny

    reedny

    Joined:
    Mar 4, 2017
    Posts:
    57
    Daydream runs on Android N (7 or greater) and that requires SDK 24 or greater. It may be possible to get Daydream to work on Android M or less, but it's not supported.
     
  3. kellerm1

    kellerm1

    Joined:
    Feb 22, 2017
    Posts:
    4
    Thank you for your answer, I thought so. Any idea on how I can force my project to compile with target sdk 23 ?

    Here is what I got so far:
    I managed to make my project compile with Virtual reality -> Daydream selected and setting:
    -The project min and target level at 24
    -The main manifest min sdk = 21, target sdk =23.
    It seems like I can "fool" Unity telling him I'm compiling with target sdk 24 while erasing it with a custom main manifest to set it to 23.

    Now the thing is, I would like to use the GVR sdk in my project, but then this tricks does not work any more since Unity tries to merge my main manifest with the gvr library that requires the target sdk 24. So the manifests won't merge if I do not set my main manifest target sdk to 24, while I need it to be 23.

    I am currently trying older versions of gvr sdk (which takes time), hopping the older libraries will not require target sdk 24...