android-ndkdaydream

I cannot run Daydream ndk sample Controller Paint


I am getting started with Google Daydream C++ apps (NDK). I am following the steps to run the Controller Paint App from this official guide

https://developers.google.com/vr/android/ndk/get-started

At the beginning I've opened ndk/demos/controllerpaint as the guide says but this way Android Studio did not recognise it as a project so I've imported the entire gvr-android-sdk folder and things looks much better. However ndk-controllerpaint is still not appearing as a target app.

Does anyone experience this?

Note: I'm using GVR Android SDK v1.60.0 which is only two days ago


Solution

  • After some hours I've realised that there are a few steps that may be easily overlooked

    1. As I wrote in the question does not import ndk/demos/controllerpaint directory to AS but the entire cloned directory (gvr-android-sdk)
    2. Run ./gradlew :extractNdk as explained in "Treasure Hunt sample app" section
    3. Uncomment this line in settings.gradle

      include ':samples:ndk-controllerpaint'

    4. Rebuild (or re-open the project)

    5. Now ndk-controllerpaint is in the target app list and is able to run

    Hope it helps someone else