I am following an online course on Android Development but I am stuck at the very beginning since I get a dependcy issue with Gradle which prevents me from successfully building example projects. The error is the famous:
Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
My Gradle is below:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
As suggested by the lecturer, I am using AS 3.0.1. However, the lecturer has not been able to solve this issue for me and since I am totally new with AS I have no idea how to proceed.
Any help would be appreciated!
Many thanks, Alberto