目录

How Do I Avoid Exceptions Resulting from HMS Core SDK Obfuscation?

Open the obfuscation configuration file proguard-rules.pro in the app directory of your project, and add configurations to exclude the HMS Core SDK from obfuscation.

-ignorewarnings
-keepattributes *Annotation*
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable
-keep class com.huawei.hianalytics.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}