I am trying to create a new project in Android Studio, using Nougat 7.0.
But, as soon as I open the project I get the following Gradle error:
Failed to resolve: com.android.support:appcompat-v7.27.+
I have tried some online solutions, but none of them have been working for me.
Below is the Module (app) build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "damo.com.testproject"
minSdkVersion 23
targetSdkVersion 27
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:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
What changes do I need to make to resolve this issue?