Reputation: 53
Pleas help with this error cause it's my first android project ! Gradle Sync: pply plugin: 'com.android.application'
android {
compileSdkVersion 8
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.interceptor.myapplication"
minSdkVersion 5
targetSdkVersion 8
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:8.0.+'
}
On Gradle console i get: FAILURE: Build failed with an exception.
What went wrong: 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:appcompat-v7:8.0.+. Versions that do not match: 24.0.0-alpha1 23.2.1 23.2.0 23.1.1 23.1.0 + 14 more Searched in the following locations: https://jcenter.bintray.com/com/android/support/appcompat-v7/maven-metadata.xml https://jcenter.bintray.com/com/android/support/appcompat-v7/ file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/maven-metadata.xml file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/maven-metadata.xml file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/ Required by: MyApplication:app:unspecified
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Upvotes: 3
Views: 8855
Reputation: 6170
You should use the correct version for the appcompat-v7
dependency.
The latest stable version of the above-mentioned dependency to now is:
compile 'com.android.support:appcompat-v7:23.2.1'
Use it as above and make sure you installed/updated to the latest version in SDK Manager before.
Upvotes: 4