0

dear community, I am trying to build an APK file of my Android app, but the Gradle Build has stuck on :mobile:transformClassesAndResourcesWithProguardForRelease for 3 hours. Here is my build.graddle for the project:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.2'

    defaultConfig {
        applicationId "com.mrgkanev.remote"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 3
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
// Flavor

    sourceSets { main { java.srcDirs = ['src/main/java', 'src/plus/java'] } }
}
repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile project(':materialDesign')
    compile('com.github.afollestad.material-dialogs:core:0.8.5.1@aar') {
        transitive = true
    }
    compile 'com.nispok:snackbar:2.7.3'
    compile project(':FloatingMenu')
    compile('com.rengwuxian.materialedittext:library:1.7.1') {
        exclude group: 'com.nineoldandroids'
    }
    compile 'com.google.android.gms:play-services:6.5.87'

}

and here is the proguard-rules.pro

-dontnote android.net.http.*
-dontnote org.apache.commons.codec.**
-dontnote org.apache.http.**

My proguard-rules.pro file contains this code, because I previously had this problem

I am convinced that there is no point of waiting anymore and something should be done. What will you advice me?

Community
  • 1
  • 1

1 Answers1

0
compile 'com.google.android.gms:play-services:6.5.87'

This brings in all of Google Play Services. It is very unlikely that you are using even most of Google Play Services, let alone all of it. Plus, that version is years out of date.

Follow the documentation, specifically the "Selectively compiling APIs into your executable" section, and only include the pieces of Play Services that you really need.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491