2016-08-31 35 views
2

無法解析:com。 android.support:cardview-v7:24.0.1和)無法解析:com.android.support:appcompat-v7:24.0.1gradle build fail錯誤:無法解析:com.android.support:cardview-v7:24.0.1和)無法解析:com.android.support:appcompat-v7:24.0.1

這是gradle這個配置 什麼我需要做的解決這個 請幫助我

apply plugin: 'com.android.application' 

    compileSdkVersion 24 
    buildToolsVersion '24.0.1' 
    defaultConfig { 
     applicationId 'com.fanbaseafrica.fabaservices' 
     minSdkVersion 14 
     targetSdkVersion 24 
     versionCode 2 
     versionName '2.0' 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      debuggable false 

      signingConfig signingConfigs.config 

      renderscriptOptimLevel 3 
     } 
     debug { 
      debuggable true 
     } 
    } 
    productFlavors { 
    } 
} 
repositories { 
    jcenter() 

} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile 'com.android.support:cardview-v7:24.0.1' 
    compile 'com.android.support:appcompat-v7:24.0.1' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.android.support:design:24.0.1' 
    compile 'de.hdodenhof:circleimageview:2.1.0' 
    compile 'com.google.code.gson:gson:2.2.3' 
    compile 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0' 
    compile 'com.android.volley:volley:1.0.0' 
    compile 'com.android.support:recyclerview-v4:24.0.1' 
    compile 'com.android.support:support-v7:24.0.1' 
    compile 'com.koushikdutta.ion:ion:2.1.6' 
    compile 'com.sprylab.android.texturevideoview:texturevideoview:1.1.1' 
} 
+0

請下載庫,如果你沒有它,它必須給你的下載鏈接 – Veer3383

+0

它確實給我鏈接下載,但它不工作 –

+0

也許這有助於:http://stackoverflow.com/questions/ 18380337/android-support-library-setup-with-maven – Jens

回答

4

這是因爲不存在與24.0.1的支持庫。

變化與有效版本所有supppor庫的依賴關係:

24.0.0 
24.1.0 
24.1.1 
24.2.0 

這裏所有的history

還有些依賴是錯誤的:

變化:

compile 'com.android.support:recyclerview-v4:24.0.1' 

compile 'com.android.support:recyclerview-v7:24.X.X' 

'com.android.support:support-v7:24.X.X'不存在。

使用

compile 'com.android.support:support-v4:24.x.x'

+0

無法解決:com.android.support:recyclerview-v4:24.0.0 –

+1

因爲它是錯誤的依賴關係:請使用com.android 。支持:recyclerview-V7:24.0.0。剛更新了答案。 –

+1

我使用*** plus符號表示法***來處理錯誤的'compile'c​​om.android.support:design:24。+''的任何編譯行。謝謝! – gnB