Search code examples
androidandroid-studiorenderscript

Gradle Error while compiling renderscript


I want to make demo app with help of render script in android studio for photo processing. But when i had build project it give me error of app:compileDebugRenderscript My project specification are as follows.

compileSdkVersion 19
buildToolsVersion '19.1.0'

minSdkVersion 16
targetSdkVersion 19
renderscriptTargetApi 18
renderscriptSupportModeEnabled true

enter image description here

Here is the snippet of my renderscript

uchar4_attribute_((kernel)) bar(uint32_t x,uint32_t y) {
    uchar4 ret  -((uchar)x,(uchar)y,(uchar)(x+y)(uchar)255)
    return ret;
}

Solution

  • Can you show any part of foo.rs? There is an error message above that mentions missing a declaration specifier. Did you skip a return value in the code? Can you try with just a mostly empty source file to get the build right first?