I am having this issue when trying to open the HMS Map on release mode with dexguard. the app crashes and gives this exception:
libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 19062 (GLThread 249), pid 15351 (nza.ambitwizhmb) 2022-01-25 23:44:02.463 19184-19184/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 2022-01-25 23:44:02.463 19184-19184/? A/DEBUG: Build fingerprint: 'HUAWEI/JNY-LX1/HWJNY:10/HUAWEIJNY-L21/10.1.0.386C185:user/release-keys' 2022-01-25 23:44:02.463 19184-19184/? A/DEBUG: uid: 10196 2022-01-25 23:44:02.463 19184-19184/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
The app works absolutely fine when I run it on debug mode. The crash timming differs when the map is opened. sometimes the map is displayed correctly but sometimes it crashes when it was loading.
dexguard configuration for hms is
-keep class com.huawei.agconnect.**{*;}
-dontwarn com.huawei.agconnect.**
-keep class com.hianalytics.android.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}
-keep interface com.huawei.hms.analytics.type.HAEventType{*;}
-keep interface com.huawei.hms.analytics.type.HAParamType{*;}
-keep class com.huawei.agconnect.** {*;}
-keepresources string/agc_*
-keepresources string/upsdk_store_url
-keepresources string/hms_update_title
-keepresourcefiles assets/hmsrootcas.bks
-keepresourcefiles assets/grs_*
It is recommended that you configure confusion by referring to this docs.
proguard-rules.proin the app's root directory of your project, and add configurations to exclude the HMS Core SDK from obfuscation.build.gradlefile of your project.keep.xmlfile as follows to keep layout resources if you have enabled R8 resource shrinking (withshrinkResourcesbeing set totruein the project-levelbuild.gradlefile) and strict reference checks (withshrinkModebeing set tostrictin theres/raw/keep.xmlfile). Not keeping layout resources will lead to app rejection during release to HUAWEI AppGallery.