Here is my graddle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.xxx.yyy"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
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'
exclude 'META-INF/INDEX.LIST'
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
preDexLibraries = false
}
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
}
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:multidex:1.0.0'
//Support Library
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
//Test
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.0'
testCompile 'junit:junit:4.12'
//Google Play Services
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
//Common Langs 3
compile 'org.apache.commons:commons-lang3:3.5'
//Google Cloud Translate
compile ('com.google.cloud:google-cloud-translate:0.7.0'){
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
exclude group: 'org.json', module: 'json'
}
//Ksoap 2
compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.2'
//Gson (Shared Preferences)
compile 'com.google.code.gson:gson:2.7'
//Loading Animation
compile 'com.pnikosis:materialish-progress:1.7'
//Snackbar
compile 'com.androidadvance:topsnackbar:1.1.1'
//SVG Animation
compile 'com.jaredrummler:animated-svg-view:1.0.0'
}
Here is the Androidmanifest.xmlpart
<application
android:name="android.support.multidex.MultiDexApplication"
android:allowBackup="true"
android:configChanges="orientation"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".SplashAnimationActivity"
Here is the android studio error:
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the build process.
Error:trouble processing "javax/transaction/HeuristicCommitException.class":
Error:Ill-advised or mistaken usage of a core class (java.* or javax.*)
Error:when not building a core library.
Error:This is often due to inadvertently including a core library file
Error:in your application's project, when using an IDE (such as
Error:Eclipse). If you are sure you're not intentionally defining a
Error:core class, then this is the most likely explanation of what's
Error:going on.
Error:However, you might actually be trying to define a class in a core
Error:namespace, the source of which you may have taken, for example,
Error:from a non-Android virtual machine project. This will most
Error:assuredly not work. At a minimum, it jeopardizes the
Error:compatibility of your app with future versions of the platform.
Error:It is also often of questionable legality.
Error:If you really intend to build a core library -- which is only
Error:appropriate as part of creating a full virtual machine
Error:distribution, as opposed to compiling an application -- then use
Error:the "--core-library" option to suppress this error message.
Error:If you go ahead and use "--core-library" but are in fact
Error:building an application, then be forewarned that your application
Error:will still fail to build or run, at some point. Please be
Error:prepared for angry customers who find, for example, that your
Error:application ceases to function once they upgrade their operating
Error:system. You will be to blame for this problem.
Error:If you are legitimately using some code that happens to be in a
Error:core package, then the easiest safe alternative you have is to
Error:repackage that code. That is, move the classes in question into
Error:your own package namespace. This means that they will never be in
Error:conflict with core system classes. JarJar is a tool that may help
Error:you in this endeavor. If you find that you cannot do this, then
Error:that is an indication that the path you are on will ultimately
Error:lead to pain, suffering, grief, and lamentation.
Error:1 error; aborting
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
Information:Total time: 46.622 secs
Information:34 errors
Information:1 warning
Information:See complete output in console
I am working on a google cloud translate application.
I am getting errors.
I search and ı have try some solution but does not help me.
What isthe problem ?
My libs folder is empty.
please help me.
I had a same issue. In my app I am using guava-retrying library, which was fetching google guava library version 21. Guava version 21 requires JDK 1.8 without providing back porting support and this was causing this error in my case.
I was able to solve it by including the guava-retrying library so that it uses version 19.0 of guava library:
compile ("com.github.rholder:guava-retrying:2.0.0") {
exclude group: 'com.google.guava', module: 'guava'
}
compile 'com.google.guava:guava:19.0'
Basically you would want to check if any of your app's dependencies require JDK 1.8 to compile, and remove/downgrade them.
Related
I added BottomNavigationView and then things started to complicate. I don't know what's causing this error, when I build project it's okay but then when I want to play app in emulator - this error pops up.
Here is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.pokrz.x"
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.parse:parse-android:1.16.3'
implementation 'com.google.android.material:material:1.0.0-beta01'
}
repositories {
mavenCentral()
}
I don't know what else I can do. I'm sooooo done with it.
Build > Clean Project helped me.
Add a new exclude line with the path that is causing the error :
exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version'
This message appears when upgrading Android Studio and has to do with Gradle Plugin Version and Gradle Version. I've seen the error with:
Android Gradle Plugin Version 3.6.2
Gradle Version 6.3
Build: Generate APK Debug
However, build was OK when generating the APK Release. More importantly, it was OK too by switching the Android Gradle Plugin Version to 3.5.0, 3.6.0, 3.6.1... and then rebuilding. Finally, it worked again well with 3.6.2 (latest version as of this writing) after switching once or twice the plugin version.
So, just play with it until you reach a combination that works. Further, try back the latest plugin version, as it seems to be just a bug of Android Studio when upgrading.
(Conclusion: No need to add 100 exclude statements in your build.gradle)
Actually the same Error Was happenimg with me also ...
and By just Re-Starting my Android Studio it solved....
Today, I was having the same problem. Below solution did not work for me
Clean the project
Invalidate case and restart
I solved that by deleting the folder. If you are facing this problem via creating release build then delete release folder and if you are facing this problem via creating debug build then delete debug folder. And now you are good to go. Now you can create signed APK.
It may help others.
Two ways to solve it
1- first
. Click on Specific project in android Studio
. Build
. Clean Project
. Run again
. Click **file**->**Invalidate Caches** /Restart
2- Second
Go to android project's in any disc you can store apps
Delete bothe folder
->debug
->release
each time I try to build an APK, this error keep showing !? I've tried almost all the soultoins mention on the site, but no luck!
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry: com/google/gson/annotations/Expose.class
My gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
lintOptions {
quiet true
abortOnError false
ignoreWarnings true
}
configurations {
all*.exclude group: 'commons-io'
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'BinaryEncoder.java'
}
defaultConfig {
applicationId "com.xxxx.xxxxx"
minSdkVersion 15
targetSdkVersion 26
versionCode 3
versionName "1.2"
multiDexEnabled true
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
sourceSets {
main {
java {
exclude 'com.twilio:client-android:1.2.18.org.apache.http.lejacy.jar.org.apache.BinaryEncoder.java'
exclude 'org.apache.commons.codec.BinaryEncoder.java'
}
}
androidTest {
java {
exclude 'commons-codec-1.10/**'
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.twilio:client-android:1.2.18') {
exclude group: 'org.apache.commons', module: 'commons-io'
}
compile project(':example')
compile project(':zoomcommonlib')
compile project(':zoommobilertc')
compile("com.github.hotchemi:permissionsdispatcher:2.4.0") {
exclude module: "support-v13"
}
compile('com.stripe:stripe-android:4.1.5') {
transitive = true;
exclude group: 'com.google.code.gson', module: 'gson'
}
compile('com.squareup.retrofit:retrofit:1.9.0') {
transitive = true;
exclude group: 'com.google.code.gson', module: 'gson'
}
compile 'com.google.android.gms:play-services-gcm:11.2.0'
compile 'lib.kingja.switchbutton:switchbutton:1.1.3'
compile 'com.orhanobut:hawk:2.0.1'
compile 'com.afollestad:material-camera:0.4.4'
compile 'com.werb.pickphotoview:pickphotoview:0.3.0'
compile 'com.github.Kennyc1012:BottomSheet:2.3.4'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.google.android.gms:play-services-identity:11.2.0'
compile 'com.google.android.gms:play-services-plus:11.2.0'
compile 'com.google.android.gms:play-services-maps:11.2.0'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.paypal.sdk:paypal-android-sdk:2.14.4'
compile 'com.koushikdutta.ion:ion:2.1.8'
compile 'com.afollestad.material-dialogs:core:0.8.6.0'
compile 'com.amitshekhar.android:android-networking:1.0.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.4.0'
}
Here's some solutions that I've tried and did not work:
I've added those transitive = true; exclude group: 'com.google.code.gson', module: 'gson' forretrofitandstripe` dependencies
I deleted the gson dependency
I wanted to delete the jar file for gson library but I couldn't find it inside libs folder !?
multiDexEnabled true was already added and did no effect
I've deleted compile fileTree(dir: 'libs', include: ['*.jar'])
I think it has something to do with the Zoom module or with Stripe any help.. !?
You could try to get the dependency tree and figure out which package it is.
I figured it out, first.. thanks guys for ur help anyhow..! but I'm making this as the accepted answer since it's the one that worked out for me!
Step 1
I searched for the duplicated class in the whole project using (Double Shift)
and it showed me which library is also using the same class..! in my case it was zoommobilertc
Step 2
I tried excluding the gson module of that library like this:
compile project(':zoommobilertc'){
exclude group: 'com.google.code.gson', module: 'gson'
}
..but it didn't work, and it give me error that I think it has something to do with exclude . I tried a few solution but no luck!
So.. I did this instead ..
Open Project View
Open External Libraries
Find the library which's zoommobilertc and unfold its folder
Delete Gson jar file that shows.!
Step 3
After that, I synced the project and tried to build an apk, bu this error showed:
Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --num-threads=4 --multi-dex --main-dex-list E:\*****\*****\app\build\intermediates\multi-dex\debug\maindexlist.txt --output E:\*****\*****\app\build\intermediates\transforms\dex\debug\folders\1000\1f\main E:\*****\*****\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar}
Then after searching I found a fix:
I added this inside build.gradle file within android section:
android{
//..
dexOptions {
javaMaxHeapSize "4g"
}
//..
}
..and this line inside local.properties file
org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
Done
Find out the dependency that causes above Error and exclude gson
as follows from your dependency,
compile ('your_dependency'){
exclude group : 'com.google.code.gson'
}
In android studio terminal execute
./gradlew clean
and perform the following and rebuild
Try adding this to your dependencies
compile'com.android.support:multidex:1.0.1'
and in manifest add this
android:name="android.support.multidex.MultiDexApplication"
in the application tag
I had my gson.jar in my libs folder.
I fixed my duplicate entries by retaining the line below:
implementation fileTree(dir: "libs", include: ["*.jar"])
And deleting this entry here:
implementation 'com.google.code.gson:gson:2.8.7'
I have written a small code, but whenever I try to build the apk, I get the following error:
Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.multidex.ClassReferenceListBuilder with arguments {C:\Users\xxxx\Desktop\yyyyy\app\build\intermediates\multi-dex\debug\componentClasses.jar C:\Users\xxxx\Desktop\yyyyy\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar}
Where xxxx is my username, and yyyyy is project name.
I have tried all possible solutions that I found on Stack Overflow, but I realized that all of them were asked about older versions.
I have the latest version of Android Studio. I am using latest version of Android SDK, the build tools, gradle, JDK 8.0 , and JRE 7. I also tried JRE 8.
build.gradle(module app) :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "xxxx.yyyyy"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "Unreleased Demo Version"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
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.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.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
}
In you build.gradle/app
defaultConfig {
....
//Add this line
multiDexEnabled true
}
dependencies {
....
//Add this line
compile 'com.android.support:multidex:1.0.0'
}
This happens as the Android platform has continued to grow, so has the size of Android apps. When your app and the libraries it references reach a certain size, you encounter build errors that indicate your app has reached a limit of the Android app build architecture
Modify the module-level build.gradle file to enable multidex and add the multidex library as a dependency, as shown here: Source
android {
defaultConfig {
multiDexEnabled true
}
}
Try this in Module:App gradle folder.
multiDexEnabled true
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'
}
I found there is no need to install JDK and JRE (ref:android studio 2.3.2 latest download page under system requirements)
And there is a folder named "jre" in programfiles/android-studio.
So I thought I shall uninstall JDK and JRE (as the problem related to java)
After this I reinstalled android studio.
And now it works fine.
(I haven't done research in deep although it helped me)
You have not shared any of your codes and dependencies you working with ,so it is difficult to guess exact problem.
but from error you posted ,i think your program cross the limit of 64K Methods.
Apk files conatins bytecode files in the form of DEX, and it has a limit of 65,536 methods in a single DEX file.
So if your App has more then 64k methods ,you should go for multiple Dex files.
Enabling mutiple Dex ,means app build process will generate more than one DEX file
defaultConfig {
....
multiDexEnabled true
}
dependencies {
....
compile 'com.android.support:multidex:1.0.0'
}
This happen when your have cross 65,536 method reference limit.
Step 1
You can add the following to your app's build.gradle file
android {
defaultConfig {
...
minSdkVersion 15
targetSdkVersion 25
multiDexEnabled true
}
...
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
Step 2A
After that you have to extend the Application class in the following way
public class MyApplication extends SomeOtherApplication {
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
Or you can do as below:
Step 2B
public class MyApplication extends MultiDexApplication { ... }
STEP 3
Finally update your manifest file like below
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application
android:name="android.support.multidex.MultiDexApplication" >
...
</application>
</manifest>
I'm working on an android app using android studio for school and I'm trying to use Jersey client to connect the app with my web services. I'm getting the following error when I attempt to add the jars required for Jersey client and compile the project.
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
From searching around for a solution to this problem it seems to me it is occurring because I am exceeding a 65k limit on methods by adding the jars. I've also seen that this can be fixed by using multidex support which I have tried to implement but the error remains when I compile the gradle.
Here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.williamj.hertz"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions{
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
exclude 'META-INF/LISCENSE.txt'
exclude 'META-INF/LISCENSE'
exclude 'META-INF/liscense.txt'
}
dexOptions{
incremental true
preDexLibraries = false
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.parse:parse-android:1.10.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:multidex:1.0.1'
}
And here is a portion of my AndroidManifest where I have added multidex support
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:name="android.support.multidex.MultiDexApplication">
I'm assuming that I'm just not implementing multidex support correctly. Any help in fixing this error would be greatly appreciated, thank you.
Have your Application override attachBaseContext:
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
link: http://developer.android.com/tools/building/multidex.html
2nd methode:
I also noticed that you are including all Google play services:
compile 'com.google.android.gms:play-services:8.4.0'
You may be able to mitigate this problem when compiling your app by specifying only the specific Google Play services APIs your app uses, instead of all of them. For information on how to do this, see: https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project
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
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!