I am trying to develop an app with one activity pulling data from a google worksheet. I am following the quickstart guide in
However, in step 4, I did not want to replace all my gradle settings with their suggestions since I am already developing with higher SDK version so I simply add the necessary compile lines from their dependencies so my gradle.app looks like this
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.erik.icaregg"
minSdkVersion 15
targetSdkVersion 25
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:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.android.support:support-v4:25.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services-auth:9.8.0'
compile 'pub.devrel:easypermissions:0.1.5'
compile('com.google.api-client:google-api-client-android:1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-sheets:v4-rev38-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
testCompile 'junit:junit:4.12'
}
When I tried to run the app or sync project with gradle the build always ends up with an error and the message is
Error:14:21:26.378 [ERROR] [org.gradle.api.Task] Conflict with dependency 'com.google.code.findbugs:jsr305'. Resolved versions for app (1.3.9) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
14:21:26.396 [ERROR] [org.gradle.BuildExceptionReporter]
14:21:26.396 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:21:26.397 [ERROR] [org.gradle.BuildExceptionReporter]
14:21:26.397 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:21:26.397 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:prepareDebugAndroidTestDependencies'.
14:21:26.397 [ERROR] [org.gradle.BuildExceptionReporter] > Dependency Error. See console for details.
14:21:26.398 [ERROR] [org.gradle.BuildExceptionReporter]
14:21:26.398 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
14:21:26.399 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:prepareDebugAndroidTestDependencies'.
The error is not shown on the workspace itself so I am really confused where the error is located. Can anyone help me out on this?
Many Thanks!