Home » Android » android – Error:(31, 0) Gradle DSL method not found: 'jniDebugBuild()'

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

Posted by: admin June 15, 2020 Leave a comment

Questions:

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?

    How to&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.