androidgradleandroid-gradle-plugindexguard

While Updating dexguard version throw error - Crashlytics plugin is applied before the DexGuard plugin


When updating dexguard version i got error ---- Crashlytics plugin is applied before the DexGuard plugin.

classpath 'com.android.tools.build:gradle:3.4.1'
dexguard version 8.5.01

my plugins --
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-crash'
apply plugin: 'dexguard'


Solution

  • Make changes in your plugin squences. Please dexguard after application plugin. Basically you need to keep fabric plugin after dexguard plugin

    apply plugin: 'com.android.application'
    apply plugin: 'dexguard' 
    apply plugin: 'io.fabric' 
    apply plugin: 'com.google.firebase.firebase-crash'