madmax madmax - 12 days ago 12
Android Question

Failed to resolve: com.android.support:appcompat-v7 24.0.1

I have searched around a lot but I cannot really find a post that helps I am somewhat new to android so some of this goes over my head. Anyway, my problems started when I got an error saying gradle plugin was old and the sync would not complete. So I changed a few things around not really sure what I did. Now I have:


Error(25,13) Failed to resolve: com.android.support:appcompat-v7 24.0.1


Project gradle file:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}


app gradle file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.bisesifreelance.maxbisesi.tic_tac_toe"
minSdkVersion 23
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.0.1'
testCompile 'junit:junit:4.12'
}


Also I have installed all build tools in SDK manager I'm not allowed to embed images yet? but it says:


Android SDK Plaform-Tools 24.03 installed

Android SDK Tools 25.2.2 installed


Thank YOu! I'm very lost.

Answer

try

  compile 'com.android.support:appcompat-v7:24.2.1'

EDIT

For sdk 25

compile 'com.android.support:appcompat-v7:25.0.1'