Aditya Labhade
Aditya Labhade

Reputation: 21

Gradle error while Importing project from eclipse to studio

i am trying to importing my eclipse project to Android studio.SO i removed all my GCM code and create code for FCM. But when i creating Build APK it shows me following error like

Error:UNEXPECTED TOP-LEVEL ERROR:
Error:java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

My gradle file contains following dependencies and libraries.

apply plugin: 'com.android.application'
android {
    useLibrary 'org.apache.http.legacy'
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "mi.nashik.online"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 16
        versionName "1.9.6"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
      }
   }

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile ('com.android.support:appcompat-v7:23.4.0')
            {
                exclude group: 'org.apache.httpcomponents', module: 'httpclient'
                exclude group: 'com.android.support'
                exclude group: 'com.android.support', module: 'support-v4'
            }
    compile ('com.google.android.gms:play-services:9.0.2'){
        exclude group: 'com.android.support'
        exclude group: 'com.google.guava'
    }
    compile 'com.google.code.gson:gson:2.1'
    compile 'com.google.protobuf:protobuf-java:2.2.0'
    compile files('libs/google-api-client-1.10.3-beta.jar')
    compile files('libs/google-api-client-android2-1.10.3-beta.jar')
    compile files('libs/google-http-client-1.10.3-beta.jar')
    compile files('libs/google-http-client-android2-1.10.3-beta.jar')
    compile files('libs/google-oauth-client-1.10.1-beta.jar')
    compile files('libs/jackson-core-asl-1.9.4.jar')
    compile files('libs/jsr305-1.3.9.jar')
    compile files('libs/library-1.2.2.jar')
    compile 'com.squareup.picasso:picasso:2.5.0'
    compile files('libs/slider.jar')
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.google.firebase:firebase-analytics:9.0.2'
    compile ('com.google.firebase:firebase-core:9.0.2')
            {
                exclude group: 'org.apache.httpcomponents', module: 'httpclient'
            }
    compile ('com.google.firebase:firebase-messaging:9.0.2'){
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
    }
    compile files('libs/universal-image-loader-1.9.3-SNAPSHOT.jar')
    compile files('libs/urlimageviewhelper-1.0.4.jar')
}
apply plugin: 'com.google.gms.google-services'

Upvotes: 2

Views: 135

Answers (1)

Nishchal Sharma
Nishchal Sharma

Reputation: 1090

Update your gradle.properties file by org.gradle.jvmargs=-Xms256m -Xmx1024m

Upvotes: 1

Related Questions