Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:(31, 0) Gradle DSL method not found: 'jniDebugBuild()'

Today I have updated my Android Studio and I keep getting this error no matter what I do. I imported a project from github everything was running smoothly until I updated now I keep getting this error:

Error:(31, 0) Gradle DSL method not found: 'jniDebugBuild()' Possible causes:

  • The project 'my_application' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file
  • The build file may be missing a Gradle plugin. Apply Gradle plugin
  • Can anyone help out?

    like image 567
    user3182266 Avatar asked Dec 19 '14 16:12

    user3182266


    People also ask

    What is DSL in gradle?

    Simply, it stands for 'Domain Specific Language'. IMO, in gradle context, DSL gives you a gradle specific way to form your build scripts. More precisely, it's a plugin-based build system that defines a way of setting up your build script using (mainly) building blocks defined in various plugins.


    1 Answers

    The name of this property has changed in v0.14.0 and later of the Android Gradle plugin, so build files created for earlier versions need to be updated. Look through all the build.gradle files in the project, and when you see jniDebugBuild, change it to jniDebuggable.

    You may run into other things that need to be renamed; the list of remappings is in the release notes at http://tools.android.com/tech-docs/new-build-system.

    like image 59
    Scott Barta Avatar answered Sep 23 '22 05:09

    Scott Barta