I wanted to add the Floating button library to the dependencies of my android app. Fact is, after using it and adding to the build.gradle, the build fails. I thought, at first, it was something about its dependencies, so I looked up them and tried to exclude them, only to no avail.
The build fails on task app:dexDebug, with the following error line
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_31\bin\java.exe'' finished with non-zero exit value 2
This is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.grebeteam.myuniversity"
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1' //make build fails on 22.2.1, not related
compile 'com.google.android.gms:play-services:7.3.0' //make build fails on 7.5.0, not related
compile 'com.google.apis:google-api-services-calendar:v3-rev121-1.20.0'
compile 'com.google.api-client:google-api-client:1.20.0'
compile 'com.google.api-client:google-api-client-android:1.20.0'
compile 'com.google.api-client:google-api-client-gson:1.20.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile ('com.melnykov:floatingactionbutton:1.3.0'){
exclude module:"library"
exclude module:"support-annotations"
exclude module:"recyclerview-v7"
exclude module:"support-v4"
}
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
}
while this is the Floating Button Library build.gradle
Am I missing something or am I doing something wrong? Thanks a lot for your time.
EDIT: This is my project level build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}