Hello,
I think that the problem is in this line:
CFlags += "-I${file("-std=c11
-I${project.buildDir}/../src/main/jni/libuvc/include/libuvc")}".toString()
It should be something like this:
CFlags += ["-I${file("src/main/jni/libuvc/include/libuvc")}", "-std=c++11"]
On Monday, July 27, 2015 at 9:43:07 PM UTC+3, Денис Котов wrote:
>
> I have some trouble! My trouble case is that the gradle build tool can't
> find header file:
>
>
> buildscript {
> repositories {
> maven { url 'https://maven.fabric.io/public' }
> }
>
> dependencies {
> classpath 'io.fabric.tools:gradle:1.+'
> }
> }
> apply plugin: 'com.android.model.application'
> //apply plugin: 'io.fabric'
>
> model {
> android {
> compileSdkVersion = 22
> buildToolsVersion = "22.0.1"
>
> defaultConfig.with {
> applicationId = "com.collosteam.usbvideorecorder"
> minSdkVersion.apiLevel = 18
> targetSdkVersion.apiLevel = 22
> versionCode = 1
> versionName = "1.0"
> }
> }
>
> android.ndk {
> moduleName = "webcam_lib"
> cppFlags += "-I${file("src/main/jni/UVCCamera")}".toString()
> cppFlags += "-I${file("src/main/jni/libjpeg")}".toString()
> cppFlags += "-I${file("src/main/jni/libusb")}".toString()
> cppFlags += "-I${file("src/main/jni/libuvc")}".toString()
>
> //ldFlags += "-L/src/main/jni/libuvc/include/libuvc"
> //ldLibs += "usb"
>
> // CFlags is configured in similiar way as cppFlags
> ldLibs +=
> "-L${file("src/main/jni/libuvc/include/libuvc")}".toString()
> CFlags += "-I${file("-std=c11
> -I${project.buildDir}/../src/main/jni/libuvc/include/libuvc")}".toString()
> // CFlags +=
> "-I${file("src/main/jni/libuvc/include/libuvc")}".toString()
> // CFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
> // CFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
> // CFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
>
> ldLibs += ["android", "EGL", "GLESv2", "log"]
> stl = "stlport_static"
> }
>
> android.sources {
> main {
> java {
> source {
> srcDirs 'src/main/java'
> }
> }
> jni {
> source {
> srcDirs 'src/main/jni'
> }
> }
> }
> }
>
> android.productFlavors {
> create("arm7") {
> ndk.abiFilters += "armeabi-v7a"
> }
> create("arm8") {
> ndk.abiFilters += "arm64-v8a"
> }
> create("x86-32") {
> ndk.abiFilters += "x86"
> }
> // for detailed abiFilter descriptions, refer to "Supported ABIs" @
> // https://developer.android.com/ndk/guides/abis.html#sa
> // build one including all productFlavors
> create("all")
> }
>
> android.buildTypes {
> release {
> isMinifyEnabled = false
> //proguardFiles += getDefaultProguardFile('proguard-android.txt')
> proguardFiles += file('proguard-rules.pro')
> }
> }
> }
>
> dependencies {
> compile fileTree(dir: 'libs', include: ['*.jar'])
> compile 'com.android.support:appcompat-v7:22.2.0'
> //compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
> // transitive = true;
> //}
> }
>
>
> Error:(37, 27) libuvc/libuvc.h: No such file or directory - i had from
> studio errors, as you see the trouble is the header path is absence. I'm
> googling and found that standard android tools not supporting sets of
> header path. How can I resolve it ?
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.