2016-06-17 4 views
0

ich bin mein Android Studio aktualisieren, aber das schafft ein Problem meines gradle für lange Zeit nimmt Projekt läuft i jede Lösung tun Suche auf Google, aber nicht gelöst meinem probleBuild.gradle nimmt lange Zeit her sync Projekt

meinen Laptop cofig ..

ram = 6GP Speicher = 1 tb Fenster 7 64bit

mein gradle ist

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.3" 
useLibrary 'org.apache.http.legacy' 
defaultConfig { 
    applicationId "com.vm.demo.myapp" 
    minSdkVersion 16 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
    multiDexEnabled true 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
dexOptions { 
    incremental true 
    javaMaxHeapSize "2g" 
    } 

} 
dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
testCompile 'junit:junit:4.12' 
compile 'com.squareup.okhttp:okhttp:2.0.0' 
compile 'com.google.code.gson:gson:2.2.4' 
compile 'com.facebook.android:facebook-android-sdk:4.5.0' 
compile 'com.android.support:appcompat-v7:23.4.0' 
compile 'com.android.support:design:23.4.0' 
compile 'com.android.support:multidex:1.0.0' 
compile 'com.google.android.gms:play-services:9.0.2' 
compile 'com.google.android.gms:play-services-ads:9.0.2' 
} 

meine gradle Eigenschaften

# Project-wide Gradle settings. 

    # IDE (e.g. Android Studio) users: 
    # Gradle settings configured through the IDE *will override* 
    # any settings specified in this file. 

    # For more details on how to configure your build environment visit 
    # http://www.gradle.org/docs/current/userguide/build_environment.html 

    # Specifies the JVM arguments used for the daemon process. 
    # The setting is particularly useful for tweaking memory settings. 
    # Default value: -Xmx10248m -XX:MaxPermSize=256m 
    org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 

    # When configured, Gradle will run in incubating parallel mode. 
    # This option should only be used with decoupled projects. More details, visit 
    # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 
    org.gradle.parallel=true 
+0

possibile Duplikat http://stackoverflow.com/questions/16775197/building-and-running-app-via-gradle-and-android-studio-is-slower-than-via-eclips –

+0

prüfen eine neue Funktion sofort ausgeführt, gleiche [Problem] (http://stackoverflow.com/questions/36623917/first-launch-take-long-time-in-android-studio-2-0-gradle-2-0/ 36625589 # 36625589) –

+0

@MaximG ich aktivieren Instant-run –

Antwort

0

Try jumboMode true auf Ihre dex Optionen hinzuzufügen.

dexOptions { 
    jumboMode true 
    incremental true 
    javaMaxHeapSize "2g" 
} 
+0

es funktioniert nicht :( –