简体   繁体   中英

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:
在 DexGuard 之前 在 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM