2016-11-25 22 views
2
apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 24 
    buildToolsVersion "24.0.1" 

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

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.2.0' 
    compile 'com.android.support:design:24.2.0' 
    compile 'com.squareup.okhttp3:okhttp:3.4.1' 
    compile 'com.google.code.gson:gson:2.2.3' 

} 

here is我正在使用的已安裝sdk的詳細信息。無法解析:com.android.support:appcompat-v7:24.4.0

幫我解決這個問題。我一直在2天內搜索它。

+0

24.2.0或24.4.0? – Shark

+0

嘗試使用最新的buildtool(buildToolsVersion「25.0.0」)和appcompact('com.android.support:appcompat-v7:25.0.1') – Shijil

回答

4

更新您的支持庫

1路

compileSdkVersion 24 
    buildToolsVersion "24.0.2" 

而且

compile 'com.android.support:appcompat-v7:24.2.0' 
compile 'com.android.support:design:24.2.0' 

然後清潔重建-搖籃

第二方式

您可以使用最新版本,

compileSdkVersion 25 
buildToolsVersion "25.0.1" 

而且

compile 'com.android.support:appcompat-v7:25.0.1' 
compile 'com.android.support:design:25.0.1' 
+1

仍然是同樣的錯誤。 –

+0

@ManXoor重新啓動您的IDE和Gradle –

+0

即使重新啓動它也不起作用。 –

1

嘗試改變compile 'com.android.support:appcompat-v7:24.2.0'compile 'com.android.support:appcompat-v7:24.4.0'

0

請更新你的JDK版本。
更新23.0.0 JDK版本爲1.7。 如果您想更新24.0.025.0.1,那麼您的JDK版本應爲1.8

Error:Buildtools 25.0.1 requires Java 1.8 or above. Current JDK version is 1.7.