2016-09-22 21 views
0

Proguardを有効にしてリリースアプリをビルドする際に問題があります。ビルディングは、タスクを実行することで立ち往生しています:app:transformClassesAndResourcesWithProguardForReleaseは40分以上かかります!:app:transformClassesAndResourcesWithProguardForReleaseが長すぎます

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile('com.github.afollestad.material-dialogs:core:[email protected]') { 
     transitive = true 
    } 
    apt 'com.jakewharton:butterknife-compiler:8.0.1' 
    compile 'com.android.support:appcompat-v7:24.2.0' 
    compile 'com.android.support:design:24.2.0' 
    compile 'com.android.support:support-v4:24.2.0' 
    compile 'com.android.support:percent:24.2.0' 
    compile 'com.android.support:recyclerview-v7:24.2.0' 
    compile 'com.android.support:cardview-v7:24.2.0' 
    compile 'com.google.android.gms:play-services-appindexing:9.4.0' 
    compile 'com.google.android.gms:play-services-analytics:9.4.0' 
    compile 'com.instabug.library:instabug:2.6.1' 
    compile 'net.hockeyapp.android:HockeySDK:4.1.0' 
    compile 'com.squareup.retrofit:retrofit:2.0.0-beta2' 
    compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2' 
    compile 'com.squareup.okhttp:logging-interceptor:2.6.0' 
    compile 'de.greenrobot:eventbus:2.4.0' 
    compile 'com.jakewharton:butterknife:8.0.1' 
    compile 'com.mobsandgeeks:android-saripaar:2.0.3' 
    compile 'uk.co.chrisjenx:calligraphy:2.1.0' 
    compile 'joda-time:joda-time:2.8.2' 
    compile 'com.github.bumptech.glide:glide:3.7.0' 
    compile 'info.hoang8f:android-segmented:1.0.6' 
    compile 'com.pnikosis:materialish-progress:1.7' 
    compile 'hanks.xyz:smallbang-library:0.1.2' 
    compile 'com.jzxiang.pickerview:TimePickerDialog:1.0.1' 
} 

この混乱の原因は何ですか?

ありがとうございます!

+2

を役に立てば幸い? 2分以上かかる場合は、Android Studioを終了してもう一度起動して、もう一度ビルドしてください。そうでなければ、依存関係のダウンロードに関する問題が発生します。 –

+0

あなたは正しいです。私はそれをし、それは本当に速く建てた。ありがとう! –

答えて

0

あなたは多くのライブラリを持っていますので、上の解説はあなたの問題を解決しません。多くのライブラリを扱うのに役立つヒントがあります。

defaultConfig { 
    .... 
    multiDexEnabled true // add this 
} 

productFlavors { 
    // Define separate dev and prod product flavors. 
    dev { 
     // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin 
     // to pre-dex each module and produce an APK that can be tested on 
     // Android Lollipop without time consuming dex merging processes. 
     minSdkVersion 21 
    } 
    prod { 
     // The actual minSdkVersion for the application. 
     minSdkVersion 17 
    } 
} 

build.gradleあなたのAPP-で

は> Androidのメーカーは、V 2.2にアップデートするので、それはHappenning

関連する問題