Problems in Android repository Flutter TensorFlow-lite by Bintray 502

I can confirm this is working fix.Already upvoted your answer.

This is tflite build gradle plugin that i modified for my tensorflow-lite project

group 'sq.flutter.tflite'
version '1.0-SNAPSHOT'

buildscript {
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
    }
}

rootProject.allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 30

    defaultConfig {
        minSdkVersion 21
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }

    dependencies {
        implementation 'org.tensorflow:tensorflow-lite:2.3.0'
        implementation 'org.tensorflow:tensorflow-lite-gpu:2.3.0'
    }
}

This is my current build gradle. I changed all jcenter to mavencentral to make it work. My project now work both offline and online.

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()  // Google's Maven repository
        mavenCentral()  // removed jcenter add this
    }

    dependencies {
        classpath 'com.google.gms:google-services:4.3.4'
        classpath 'com.android.tools.build:gradle:4.0.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()  // Google's Maven repository
        mavenCentral() // removed jcenter add this
    }
}

rootProject.buildDir="../build"
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

By the im using TFlite plugin version 1.1.1

Gradle wrapper version

distributionUrl = https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

Leave a Comment