找不到com.android.support:design:23.0.1

时间:2016-01-03 20:08:31

标签: android android-studio

我无法编译我的android项目,但我无法找到原因。顺便说一句,该项目在另一台计算机上成功编译。 这是我的build.gradle文件:

NODE_APP='app02' nodemon ./server/server.js

这是堆栈跟踪:

  

错误:配置项目':app'时出现问题。无法解决   配置的所有依赖项':app:_debugCompile'。不能   找到com.android.support:design:23.0.1。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.iba.navdrawer"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:design:23.0.1'
    compile 'com.google.android.gms:play-services-maps:8.3.0'
    compile 'com.google.maps.android:android-maps-utils:0.4+'
}
     

找不到com.google.android.gms:play-services-maps:8.3.0。

 Searched in the following locations:
     https://jcenter.bintray.com/com/android/support/design/23.0.1/design-23.0.1.pom
     https://jcenter.bintray.com/com/android/support/design/23.0.1/design-23.0.1.jar
     file:/C:/Program Files/Android/android-sdk/extras/android/m2repository/com/android/support/design/23.0.1/design-23.0.1.pom
     file:/C:/Program Files/Android/android-sdk/extras/android/m2repository/com/android/support/design/23.0.1/design-23.0.1.jar
     file:/C:/Program Files/Android/android-sdk/extras/google/m2repository/com/android/support/design/23.0.1/design-23.0.1.pom
     file:/C:/Program Files/Android/android-sdk/extras/google/m2repository/com/android/support/design/23.0.1/design-23.0.1.jar
 Required by:
     NavDrawer:app:unspecified

这是我的经纪人: enter image description here enter image description here

1 个答案:

答案 0 :(得分:1)

当然是。你正在使用: 23.0.1

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:design:23.0.1'
    compile 'com.google.android.gms:play-services-maps:8.3.0'
    compile 'com.google.maps.android:android-maps-utils:0.4+'
}

你已经下载了 23.1.1 ,而且gradle无法找到它。

使用:

dependencies {
    compile 'com.android.support:design:23.1.1'
}

或者您应该下载以前的版本以供使用。

此外,请记住您需要更新支持存储库以在Android Studio上查找软件包

当然,目前看来最好的方法是更新SDK Manager

上的所有软件包