I am trying to integrate Tensorflow with Android Studio. I created the module and all library dependencies but i keep getting this error:
Build file '/home/User/AndroidStudioProjects/MyApp/tensorflow-android-1.13.1/build.gradle' line: 4 A problem occurred evaluating project ':tensorflow-android-1.13.1'.
Could not find method implementation() for arguments [DefaultProjectDependency{dependencyProject='project ':app'', configuration='default'}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Meanwhile if i try using compile instead of implementation(), it's already deprecated. My build.gradle file of the project is:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url "https://chaquo.com/maven" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
implementation'org.tensorflow:tensorflow-android:+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "com.chaquo.python:gradle:7.0.2"
}
}
allprojects {
repositories {
google()
jcenter()
// maven{
// url 'https://maven.google.com/'
// name 'Google'
// }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}