Android Multidex and the Dex Method Limit Counting Method References On Every Build (Dexcount Gradle Plugin)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

The dexcount plugin counts methods and class resource count after a successful build.

Add the plugin in the app/build.gradle:

apply plugin: 'com.android.application'

buildscript {
    repositories {
        mavenCentral() // or jcenter()
    }

    dependencies {
        classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.5.5'
    }
}

Apply the plugin in the app/build.gradle file:

apply plugin: 'com.getkeepsafe.dexcount'

Look for the output data generated by the plugin in:

../app/build/outputs/dexcount

Especially useful is the .html chart in:

../app/build/outputs/dexcount/debugChart/index.html



Got any Android Question?