Ionic splashscreen is broken after ProGuard/DexGuard


We’re using SplashScreen plugin on the Ionic App, which seems to work fine on usual debug and release builds.
But when we turn on the DexGuard/ProGuard for build steps and generate a protected APK file,
there the splash screen is not shown at all.

Instead, a black screen is shown with white strange borders and no spinner anymore.

Here are the screenshots before and after Dexguard:
Before DexGuard
After DexGuard

In dexguard rules I’ve added the following lines to avoid renaming the splash screen images

-keepresourcefiles res/**

But it didn’t help.

How to solve the problem?


It turned out dexguard was somehow still touching the splash screen files or resource names.
As a quick fix adding this rule worked:

-keepresources */*

But we might need a better and more specific solution.

Answered By – Just Shadow

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published