2017-02-06 9 views
2

アンドロイドスタジオで自分のプロジェクトを実行しようとすると、このエラーが発生する誰かが私を助けることができる?アンドロイドスタジオでこのgradleエラーを手伝ってもらえますか?

Error:A problem occurred configuring project ':app'. 
> Could not resolve all dependencies for configuration ':app:_debugCompile'. 
    > Could not find any version that matches com.android.support:cardview-v7:23.4.0.+. 
    Versions that do not match: 
     25.1.1 
     25.1.0 
     25.0.1 
     25.0.0 
     24.2.1 
     + 22 more 
    Searched in the following locations: 
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/cardview-v7/maven-metadata.xml 
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/cardview-v7/ 
     https://jcenter.bintray.com/com/android/support/cardview-v7/maven-metadata.xml 
     https://jcenter.bintray.com/com/android/support/cardview-v7/ 
     file:/C:/Users/EDUdigital/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/cardview-v7/maven-metadata.xml 
     file:/C:/Users/EDUdigital/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/cardview-v7/maven-metadata.xml 
     file:/C:/Users/EDUdigital/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/cardview-v7/ 
    Required by: 
     AppTraining:app:unspecified 
+2

あなたのアプリのbuild.gradleファイルを投稿してください –

答えて

0

マイbuild.gradle、したがって、依存関係の25+バージョンを必要とするだろう、API 25SDKをコンパイルします。

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.1" 

    defaultConfig { 
     minSdkVersion 15 
     targetSdkVersion 25 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:25.1.1' 
    compile 'com.android.support:design:25.1.1' 
    compile 'com.android.support:cardview-v7:25.1.1' 
    compile 'com.android.support:recyclerview-v7:25.1.1' 
} 

バージョンは、コンパイルするAPIのバージョンによって異なります。 .+を実行するのではなく、特定のバージョンを指定するとよいでしょう。compile 'com.android.support:cardview-v7:24.0.0'

0

SDKマネージャに「Android Support Repository」をインストールする必要があります。そうでない場合は、あなたの依存関係のバージョンをgradleファイルで変更する必要があります。だから、例として

関連する問題