编译项目时出现错误25.0.0

时间:2016-11-01 06:34:57

标签: android

我有一个项目,到目前为止运行正常。今天突然面临这些问题:

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find com.android.support:appcompat-v7:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified
         Yokura-Seeker:app:unspecified > com.android.support:design:23.4.0
   > Could not find com.android.support:cardview-v7:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified
   > Could not find com.android.support:support-v4:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified > com.android.support:design:23.4.0
         Yokura-Seeker:app:unspecified > com.android.support:recyclerview-v7:23.4.0
   > Could not find com.android.support:support-v4:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified > com.facebook.android:facebook-android-sdk:4.17.0
   > Could not find com.android.support:appcompat-v7:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified > com.facebook.android:facebook-android-sdk:4.17.0
   > Could not find com.android.support:cardview-v7:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/cardview-v7/25.0.0/cardview-v7-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified > com.facebook.android:facebook-android-sdk:4.17.0
   > Could not find com.android.support:customtabs:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/customtabs/25.0.0/customtabs-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/customtabs/25.0.0/customtabs-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/customtabs/25.0.0/customtabs-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/customtabs/25.0.0/customtabs-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/customtabs/25.0.0/customtabs-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/customtabs/25.0.0/customtabs-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/customtabs/25.0.0/customtabs-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/customtabs/25.0.0/customtabs-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/customtabs/25.0.0/customtabs-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/customtabs/25.0.0/customtabs-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified > com.facebook.android:facebook-android-sdk:4.17.0
   > Could not find com.android.support:support-v4:25.0.0.
     Searched in the following locations:
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/Android Studio/Android Studio/gradle/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         https://jcenter.bintray.com/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         https://jcenter.bintray.com/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         https://repo1.maven.org/maven2/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         https://repo1.maven.org/maven2/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/android/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.pom
         file:/D:/NewEclips/android-sdk-windows/extras/google/m2repository/com/android/support/support-v4/25.0.0/support-v4-25.0.0.jar
     Required by:
         Yokura-Seeker:app:unspecified > com.google.android.gms:play-services-auth:9.8.0 > com.google.android.gms:play-services-basement:9.8.0

我的sdk中也没有25.0.0,havnt仍然下载它,而且我的编译版本是23.0.2然后你是在搜索25.0.0吗?

编辑:

我现在面临的确切问题是我正在使用

compile 'com.facebook.android:facebook-android-sdk:4.+'

在gradle for facebook。

并且在这个库中它使用的是25.0.0,那我该如何避免呢?

3 个答案:

答案 0 :(得分:12)

因为你没有指定facebook SDK的确切版本:compile 'com.facebook.android:facebook-android-sdk:4.+',它使用任何版本(可能是最新版本),可能针对最新的SDK(25),并且需要最新的支持库版本。 /> 所以你有两种方法来解决它:

  1. 安装缺少的库,可能会在项目中定位SDK 25
  2. 使用一些确切版本的facebook SDK,它不针对最新的Android SDK

答案 1 :(得分:5)

只需更换facebook编译版,因为在最新版本中支持lib更新为SDK版本25 编译'com.facebook.android:facebook-android-sdk:4.16.1'
只需转到此链接查看SDK的更改日志 https://developers.facebook.com/docs/android/change-log-4.x

答案 2 :(得分:4)

TL; DR只需安装API 25并在SDK Manager中更新所有内容。