代码之家  ›  专栏  ›  技术社区  ›  Wyck

找不到com.android.support:appcompat-v7:23.1.1

  •  0
  • Wyck  · 技术社区  · 4 年前

    https://github.com/kosiara/artoolkit-android-studio-example

    我有Windows10上的AndroidStudio 4.0.2。

    我得到的构建错误是:

    Executing tasks: [:app:assembleDebug] in project D:\Downloads\artoolkit-android-studio-example-master\artoolkit-android-studio-example-master
    
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring project ':app'.
    > A problem occurred configuring project ':base'.
       > Could not resolve all dependencies for configuration ':base:_debugCompile'.
          > Could not find com.android.support:appcompat-v7:23.1.1.
            Searched in the following locations:
                https://jcenter.bintray.com/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom
                https://jcenter.bintray.com/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar
            Required by:
                artoolkit-android-studio-example-master:base:unspecified
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 1.346 secs
    

    恐怕我不明白怎么了。

    我怀疑我的SDK或Android Studio可能设置不正确,但我不知道下一步要检查什么。

    this related question 但这个问题没有答案。

    0 回复  |  直到 4 年前
        1
  •  0
  •   Veener Patrick Jackson    4 年前

    该模块的该版本(appcompat-v7)不在JCenter存储库中。

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
        repositories {
            jcenter()
            maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:1.5.0'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }