Reputation: 812
I'm starting to get crazy with the error I'm getting in Android Studio when importing all jackson dependencies.
This app is working just fine in Eclipse with ADT (is a old app, with old dependencies), but I decided to migrate it because when I'm trying to use Parse, there was some errors I wasn't able to resolve quickly.
Here is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.racsa.oncecincocinco"
minSdkVersion 15
targetSdkVersion 22
}
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':library')
compile project(':facebookSDK')
compile fileTree(dir: 'libs')
// parse
//compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.google.code.gson:gson:2.3'
compile 'com.google.android.gms:play-services:5.0.89'
/*
compile files('libs/augmentrealityframework.jar')
compile files('libs/commons-codec-1.5.jar')
compile files('libs/commons-io-1.3.2.jar')
compile files('libs/commons-lang3-3.1.jar')
compile files('libs/robospice-1.4.6.jar')
compile files('libs/robospice-cache-1.4.6.jar')
compile files('libs/robospice-spring-android-1.4.6.jar')
compile files('libs/simple-xml-2.7.1.jar')
compile files('libs/spring-android-core-1.0.1.RELEASE.jar')
compile files('libs/spring-android-rest-template-1.0.1.RELEASE.jar')
compile files('libs/twitter4j-core-4.0.2.jar')
compile files('libs/twitter4j-media-support-4.0.2.jar')*/
}
I know there's no dependencies saying jackson, that's because I have them physically in my /libs folder, but I get java exited with non zero value 2(I have red about this, and its basically because there's a double reference to a library) and I just can't find where and which library is called twice.
Here is my /libs folder:
Thanks in advance
Upvotes: 1
Views: 1419
Reputation: 812
I was able to resolve this the "hard way" by changing RoboSpice
and Jackson
for Asynctask
. Now the app is faster (don't ask me why, 'cause I don't know) and working perfectly in Android Studio.
In the end, my gradle file looks like this:
dependencies {
compile project(':library')
compile project(':facebookSDK')
compile fileTree(dir: 'libs')
// parse
//compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.google.code.gson:gson:2.3'
compile 'com.google.android.gms:play-services:5.0.89'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.6.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.0'
}
And my /libs
folder is the same, but without all the jackson dependencies. Thanks anyway!
Upvotes: 1