patrickfav / Dali

Dali is an image blur library for Android. It contains several modules for static blurring, live blurring and animations.
https://favr.dev/opensource/dali
Apache License 2.0
1.05k stars 89 forks source link

Could not find method renderscriptTargetApi() #6

Closed Kolyall closed 7 years ago

Kolyall commented 7 years ago

After adding this:

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    renderscriptTargetApi 20
    renderscriptSupportModeEnabled true
...

gradle return error:

Error:(22, 0) Could not find method renderscriptTargetApi() for arguments [20] on project ':app' of type org.gradle.api.Project.
<a href="openFile:D:\Projects\Test\app\build.gradle">Open File</a>
patrickfav commented 7 years ago

The example in the readme is wrong, the config belongs to defaultConfig

android {
    defaultConfig {
        ...
        renderscriptTargetApi 20
        renderscriptSupportModeEnabled true
    }
}

see: https://github.com/patrickfav/Dali/blob/master/app/build.gradle

Also check if you use the most recent build tools (25.x)