Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renderscript not compiling with build tools 25.0.0+

I'm getting the following error after updating to build tools 25.0.2 (with 23.0.2 it was working just fine):

Error:target API level '25' is out of range ('11' - '24')

Error:Execution failed for task ':app:compileDevDebugRenderscript'.
> com.android.ide.common.process.ProcessException: Error while executing process /usr/local/opt/android-sdk/build-tools/25.0.2/llvm-rs-cc with arguments {-O 3 -I /usr/local/opt/android-sdk/build-tools/25.0.2/renderscript/include/ -I /usr/local/opt/android-sdk/build-tools/25.0.2/renderscript/clang-include/ -p /<redacted>/app/build/generated/source/rs/dev/debug -o /<redacted>/app/build/generated/res/rs/dev/debug/raw -target-api 25 /<redacted>/app/src/main/rs/<redacted>.rs}

I have the following in app/build.gradle:

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 25
        renderscriptTargetApi 21
        renderscriptSupportModeEnabled false
        ...
    }
    ...
}

As you can see renderscriptTargetApi is set to 21, but the new build tools forces it to be 25 regardless. I can't turn on support mode due to a dependency to a library which requires it to be turned off.

Should I just revert back to build tools 23.0.2 and wait for a fix or is there any workarounds to get renderscript to work with the latest build tools?

like image 920
etan Avatar asked Feb 04 '23 22:02

etan


1 Answers

Seems it bug in build tools r25. I've submitted a ticket to Android tracker: https://code.google.com/p/android/issues/detail?id=260929&thanks=260929&ts=1490175869

like image 168
Eugene Nefedov Avatar answered Feb 15 '23 09:02

Eugene Nefedov