Forum Discussion
jharan
4 years agoHonored Guest
VrSamples/VrCubeworld_Framework/Projects/Android build fails
I'm brand new to Oculus development, so definite newbie here.
I'm attempting to follow the instructions at:
developer.oculus.com/documentation/native/android/mobile-studio-basics/
I haven't set my Quest to developer mode yet so I figured I'd see if I can just get the sample code to build. All seems fine until I select Build->Make Project from the menu bar to start the build. It ended up reporting the following error message:
Execution failed for task ':SampleFramework:Projects:Android:externalNativeBuildDebug'.
> Unexpected native build target sampleframework. Valid values are HandMaskRenderer, HandRenderer, Framebuffer, SurfaceRenderApp, Appl, HandModel, Android
One thing that was not clear from the documentation. It tells me to:
===QUOTE===
Select Target Configuration, Build, and Run
Make sure you have followed the configuration steps in Device Setup - Oculus Android and Android Development Software Setup to ensure your device and development environment are configured appropriately.
Before building, select the target configuration you wish to build by selecting Edit Configurations in the project menu in the Android Studio toolbar.
=== END QUOTE ===
I did perform the tasks described in Android Development Software Setup, but not the steps in Device Setup - Oculus Android since I figured those would be necessary for downloading and running the built code on the target Quest but not for just building it.
I did click Edit Configurations as described but since the documentation doesn't describe what to do in the resultant "Run/Debug Configurations" window I just Cancelled out of it. I then ran Build->Make Project and that when I got the error message.
Is it necessary to connect the target Quest just to build the code?
I'm guessing it has to do with something I failed to do in Edit Configurations.
Help appreciated. Thanks.
1 Reply
- billtiHonored Guest
I just hit exactly the same issue and couldn't figure it out. I was using the OpenXR SDK fine last night without problem, but trying the "VrCubeWorld_Framework" sample from the Mobile SDK in exactly the same way is giving me the same error as you are seeing. (I had an old 1.42 SDK as well as the current 1.50 SDK and see the same issue in both).
What did work for me is using the command line. I'm on Windows and have the SDK extracted into "C:\src". If I have a command-prompt at "C:\src\ovr_sdk_mobile_1.50.0\VrSamples\VrCubeWorld_Framework\Projects\Android" and run ".\build.bat debug" (or just ".\build.bat" if you want a release build) then that works fine. If I then open the project in Android Studio I can launch and debug for there (it doesn't try to rebuild if it's up to date)
See if that works for you. Hopefully you can get by (as I will) by editing in Android Studio and building on the command-line for now.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 9 months ago