Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find method renderscriptTargetApi() #6

Closed
Kolyall opened this issue Feb 9, 2017 · 1 comment
Closed

Could not find method renderscriptTargetApi() #6

Kolyall opened this issue Feb 9, 2017 · 1 comment

Comments

@Kolyall
Copy link

Kolyall commented Feb 9, 2017

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
Copy link
Owner

patrickfav commented Feb 9, 2017

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants