3

It is the build.gradle on project

dependencies {

    classpath 'com.android.tools.build:gradle:2.1.0-alpha1'
 .....
}

It is the build.gradle on app

android {

compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
    minSdkVersion 21
    targetSdkVersion 23
    .......
    //Renderscript support mode is not currently supported with renderscript target 21+
    renderscriptTargetApi 19
    renderscriptSupportModeEnabled true
}

When I built it , I met a error,

Renderscript support mode is not currently supported with renderscript target 21+

If I change minSdkVersion as 19, it can be built successfully.

But I need to set minSDKVersion as 21. Any one know what's going wrong ?

  • Check this link: http://stackoverflow.com/questions/34111126/android-studio-2-0-preview-2-issue-with-renderscript – Dhruv Mar 16 '16 at 05:24

1 Answers1

4

Yep, this is a bug. 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-alpha5'
    }
}


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