I would like to build the sample projects included in the gear vr framework using Android Studio on Windows 8. I imported the "simple-sample" project (GVRf\Sample\simple-sample) into Android Studio 1.5, and configured the NDK to be the latest version: android-ndk-r10e
However, I kept getting this error when building the project:
limits: No such file or directory
the < limits > header is included in glm.hpp, located at "framework\src\main\jni\contrib\glm"
Here is my Application.mk file inside directory "\framework\src\main\jni"
APP_ABI := armeabi-v7a
APP_PLATFORM := android-19
#APP_STL := stlport_static
APP_STL := gnustl_static
NDK_TOOLCHAIN_VERSION := 4.8
ifndef OVR_MOBILE_SDK
OVR_MOBILE_SDK=../../ovr_sdk_mobile
endif
NDK_MODULE_PATH := $(OVR_MOBILE_SDK)
People suggested several ways to address this problem:
1. set NDK_TOLLCHAIN_VERSION := 4.4.3 (post)
2. set APP_STL := gnustl_static (post)
I tried both and neither worked. However, it seems like the problem is that the Application.mk file is ignored by Android Studio. Because I typed some junk in there and it didn't seem to affect anything.
So I also tried to configure the NDK by modifying build.gradle file inside the \framework folder:
android {
defaultConfig {
ndk {
stl "stlport_static"
}
}
}
Not much success either, don't know how to correctly set the values.
There is a line of words on the Gear VR guide website which might be relevant (my error is indeed at the JNI level):
NOTE: Do NOT install a CDT version higher than 8.0.2 or you will encounter parser errors at the JNI level, even though these will not affect building and running your GearVRf application.
Can someone please help? Thanks!