繁体   English   中英

找不到com.android.tools.build:gradle:3.0.1。 在尝试构建tensorflow lite演示应用程序时

[英]Could not find com.android.tools.build:gradle:3.0.1. while trying to build tensorflow lite demo app

我收到此错误。 我正在尝试构建Tensorflow lite演示应用程序,但无法正常工作。

找不到com.android.tools.build:gradle:3.0.1。 在以下位置搜索: https : //jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom https://jcenter.bintray.com/com/android /tools/build/gradle/3.0.1/gradle-3.0.1.jar必需:project:打开文件

这是我的构建,gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "android.example.com.tflitecamerademo"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        // Remove this block.
        jackOptions {
            enabled true
        }
    }
    lintOptions {
        abortOnError false
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    aaptOptions {
        noCompress "tflite"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    maven {
        url 'https://google.bintray.com/tensorflow'
    }
    google()
    maven {
        url 'https://maven.google.com/'
        name 'Google'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:25.2.0'
    compile 'com.android.support:support-annotations:25.3.1'
    compile 'com.android.support:support-v13:25.2.0'

    compile 'org.tensorflow:tensorflow-lite:+'

    testCompile 'junit:junit:4.12'
}

buildscript {
    repositories {
        google()
        jcenter()
        mavenLocal()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.1'
        }
    }
}

请尝试如下更改classpath dependencies

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

并且也请参考这个链接

谢谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM