12

I updated Android Studio to 2.0 Preview 2, then I got an error Renderscript support mode is not currently supported with renderscript target 21+

I'm using renderscriptTargetApi 23

atabouraya
  • 3,233
  • 1
  • 26
  • 31

5 Answers5

14

Renderscript isn't currently supported with Target 21+ so simply change the target to API 20 and that should solve the error. So the renderscript related options in your default config section of your gradle file should like :

renderscriptTargetApi 20
renderscriptSupportModeEnabled true
Joel Dean
  • 2,444
  • 5
  • 32
  • 50
10

The bug related to renderscriptTargetApi has been fixed in gradle-plugin 2.1.0 and Build-Tools 23.0.3. Please try it out:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
    }
}


android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    ...
}
Miao Wang
  • 1,120
  • 9
  • 12
3

@atabouraya, This is bug in build tools. Please check your build tools version and if is lower than 23.0.3, update them. More info here: http://developer.android.com/intl/es/tools/revisions/build-tools.html in Build Tools, Revision 23.0.3 (March 2016)

wkozak90
  • 31
  • 3
  • 1
    and this is proper answer, works with Gradle 2.1.0, currently highest dev version is alpha5: `com.android.tools.build:gradle:2.1.0-alpha5` . so at this moment we have to pick build system in alpha and newset supporting for renderscript or older render script with current stable version of Gradle. Waitng for final Gradle 2.1.0 – snachmsm Apr 11 '16 at 09:40
0

@atabouraya, There need to be change in build.gradle of your app

as suggested from android developer site.

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19

        renderscriptTargetApi 18
        renderscriptSupportModeEnabled true

    }
}
TejaDroid
  • 6,561
  • 4
  • 31
  • 38
0

Just change renderscriptTargetApi 23 to renderscriptTargetApi 20, and make sure your minSdkVersion less than 21.

iibrahimbakr
  • 1,116
  • 1
  • 13
  • 32