Use renderscript with gradle experimental

I'm developing an application for android in the image processing area. Thus, I need high performance. Part of the code is written in NDK and elsewhere in Renderscript. However, I can not compile the application due to ScriptC_ files are not being generated.

My rs files are in the folder ... \ app \ src \ main \ rs

And the raw folder was created in the \ res

Follow the gradle file (app):

apply plugin: 'com.android.model.application'

model {
    android {
        compileSdkVersion = 22
        buildToolsVersion = "22.0.1"

        defaultConfig.with {
            applicationId = "com.google.sample.helloandroidjni"
            minSdkVersion.apiLevel = 18
            targetSdkVersion.apiLevel = 23
            versionCode = 1
            versionName = "1.0"

            //habilita o renderscript no projeto
            renderscriptTargetApi = 18
            renderscriptSupportModeEnabled = true
        }

    }

    android.buildTypes {
        release {
            minifyEnabled = false
            proguardFiles.add(file('proguard-android.txt'))
        }
    }

//     ldLibs = ["android", "jnigraphics", <other ndk libraries you might need>] --> Compila as classe necessarias no codigo c
    android.ndk {
        moduleName = "ibmphotophun"
        ldLibs.addAll(["android", "EGL", "GLESv2", "dl", "log", "z", "jnigraphics"]) //adicao de bibliotecas nativas em c do NDK android
        debuggable = true
    }

    android.productFlavors {
        create("arm") {
            ndk.abiFilters.add("armeabi")
        }
        create("arm7") {
            ndk.abiFilters.add("armeabi-v7a")
        }
        create("arm8") {
            ndk.abiFilters.add("arm64-v8a")
        }
        create("x86") {
            ndk.abiFilters.add("x86")
        }
        create("x86-64") {
            ndk.abiFilters.add("x86_64")
        }
        create("mips") {
            ndk.abiFilters.add("mips")
        }
        create("mips-64") {
            ndk.abiFilters.add("mips64")
        }
        create("all")
    }
}

//repositories {
//    maven {
//        url 'https://raw.github.com/vRallev/mvn-repo/master/'
//    }
//}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:support-v4:22.2.0'
    compile files('libs/droidText.0.4.jar')
    compile files('libs/brimage.jar')
}

Answers


Try to rename "rs" folder to "renderscript". It looks like gradle-experimental uses this folder for renderscript code. Helped me to solve this issue with gradle-experimental:0.7.0-beta1


Need Your Help

need some modrewrite regex syntax

regex mod-rewrite

Trying to write a redirect that is a little out of the norm for me. Wondering if someone could help me with the syntax.

Is there a better design pattern/method to use?

c++ xml design-patterns

I've currently completed one of two phases of a project that required I write database information to XML using C++. While use of a third party tool was used to do the actually formatting of XML ta...