Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio "Could not find method implementation() for arguments"

I'm very new to Android studio and Gradle so please be specific with your suggestions.

I downloaded this git repository because I needed a template of an app with OCR integrated into it. The project was built in Eclipse so I used the Android Studio Import tool to convert it to an Android Studio project. After attempting to build the project and resolving the first few errors by clicking on the links inside the errors, I got the "Could not find method implementation()" error which I can't seem to resolve. NOTE - I installed Android Studio just today so I have everything updated. This is what my build.gradle file looks like:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        implementation 'com.rmtheis:tess-two:9.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}
like image 769
felisimo Avatar asked Mar 20 '26 21:03

felisimo


1 Answers

You need to add this

implementation 'com.rmtheis:tess-two:9.0.0'

in build.gradle app file under dependencies instead of build.gradle project file.

build.gradle

dependencies {
    //...
    implementation 'com.rmtheis:tess-two:9.0.0'
    //...
}
like image 180
Pavneet_Singh Avatar answered Mar 23 '26 10:03

Pavneet_Singh