2016-01-28 5 views
7

मेरे पास एक बहु-परियोजना (2 मॉड्यूल) है जिसमें इमारत प्रत्येक बार लगभग 1/2 मिनट लेती है। जब मैं एंड्रॉइड स्टूडियो में रन दबाता हूं, तो मुझे ऐप के पुनर्निर्माण के लिए हर बार इंतजार करना पड़ता है, जो बेहद धीमी है। हर बार 6/8 मिनट लगते हैं।ग्रैडल और एंड्रॉइड स्टूडियो 2.0 के माध्यम से बिल्डिंग और रनिंग ऐप धीमा है

enter image description here

यह एंड्रॉयड स्टूडियो में निर्माण की प्रक्रिया को स्वचालित करने के लिए संभव है? या क्या आपको इस प्रक्रिया को तेज़ बनाने के बारे में कोई सलाह है?

यहाँ मेरी build.gradle फ़ाइल (एप्लिकेशन मॉड्यूल) है:

allprojects { 
    repositories { 
     mavenCentral() 
     maven { url "https://jitpack.io" } 
     maven { url 'http://clinker.47deg.com/nexus/content/groups/public' } 
    } 
} 

apply plugin: 'com.android.application' 

dependencies { 
    compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:1.0.0' 
    compile fileTree(dir: 'libs', include: '*.jar') 
    compile('com.fortysevendeg.swipelistview:swipelistview:[email protected]') { 
     transitive = true 
    } 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.github.nirhart:parallaxscroll:1.0' 

    compile 'com.github.amlcurran.showcaseview:library:5.0.0' 
    compile 'com.android.support:support-v4:22.0.1' 
    compile 'com.android.support:appcompat-v7:22.0.1' 
    compile 'com.android.support:design:22.2.+' 
    compile 'com.rengwuxian.materialedittext:library:2.1.4' 
    compile 'com.nineoldandroids:library:2.4.0' 
    compile 'com.daimajia.easing:library:[email protected]' 
    compile 'com.daimajia.androidanimations:library:[email protected]' 
    compile 'com.pnikosis:materialish-progress:1.7' 
    compile 'com.github.fenjuly:ArrowDownloadButton:9e15b85e8a' 
    compile 'ch.acra:acra:4.5.0' 
    compile 'com.yalantis:contextmenu:1.0.5' 
     compile project(':locationlib') 
    } 

    configurations { 
     compile.exclude group: 'javax.inject', module: 'javax.inject' 
    } 

    android { 
     compileSdkVersion 22 
     buildToolsVersion '22.0.1' 

    compileOptions { 

     encoding "UTF-8" 
     sourceCompatibility JavaVersion.VERSION_1_7 
     targetCompatibility JavaVersion.VERSION_1_7 
    } 
    lintOptions { 
     abortOnError false 
    } 

    dexOptions { 
     javaMaxHeapSize "8g" 
     jumboMode true 
    } 


    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

    packagingOptions { 
     exclude 'META-INF/DEPENDENCIES.txt' 
     exclude 'META-INF/DEPENDENCIES' 
     exclude 'META-INF/dependencies.txt' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/license.txt' 
     exclude 'META-INF/LGPL2.1' 
     exclude 'META-INF/NOTICE.txt' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/notice.txt' 
     exclude 'META-INF/INDEX.LIST' 
     exclude 'META-INF/ASL2.0' 

    } 
    defaultConfig { 
     targetSdkVersion 22 
     renderscriptTargetApi 19 
     renderscriptSupportModeEnabled false 
     multiDexEnabled true 
    } 
    productFlavors { 
    } 

    afterEvaluate { 
     tasks.matching { 
      it.name.startsWith('dex') 
     }.each { dx -> 
      if (dx.additionalParameters == null) { 
       dx.additionalParameters = [] 
      } 
      dx.additionalParameters += '--multi-dex' 

     } 
    } 
    } 

मेरे नोटबुक पहलुओं I3 8GB रैम और विंडोज 10 64bits

वास्तव में कर रहे हैं मैं एंड्रॉयड स्टूडियो 2.0 पूर्वावलोकन 9 है इस studio64.exe.vmoptions साथ

-Xms256m 
-Xmx1280m 
-XX:MaxPermSize=350m 
-XX:ReservedCodeCacheSize=240m 
-XX:+UseConcMarkSweepGC 
-XX:SoftRefLRUPolicyMSPerMB=50 
-ea 
-XX:-OmitStackTraceInFastThrow 
-Djna.nosys=true 
-Djna.boot.library.path= 

-Djna.debug_load=true 
-Djna.debug_load.jna=true 
-Dsun.io.useCanonCaches=false 
-Djava.net.preferIPv4Stack=true 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:-OmitStackTraceInFastThrow 
-Didea.paths.selector=AndroidStudioPreview2.0 
-Didea.platform.prefix=AndroidStudio 

और Gradle काम आप एंड्रॉयड स्टूडियो 1.5.1 जो बहुत तेजी से एंड्रॉयड स्टूडियो का पिछला संस्करण की तुलना में है का उपयोग करना चाहिए ऑफ़लाइन

+0

एंड्रॉइड स्टूडियो 2.0 पूर्वावलोकन में एक सामान्य समय है। या पूर्वावलोकन 7 और अद्यतन करने के लिए अद्यतन करें। – Webserveis

उत्तर

1

है।

+0

वे 2.0 की कोशिश कर रहे हैं जो 1.5.1 – FuriousGeorge

+0

@FuriousGeorge Oppps से नया है क्षमा करें :( –

0

47deg maven भंडार वास्तव में धीमा है। आपका सबसे अच्छा विकल्प कहीं और उनके द्वारा प्रदान की निर्भरता को हल करने के लिए एक रास्ता खोजने के लिए और अपने खजाने शरीर से इस लाइन को हटा रहा है:

maven { url 'http://clinker.47deg.com/nexus/content/groups/public' } 

निर्माण समय काफ़ी छोटा होगा।

संबंधित मुद्दे