You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to use the latest version of Gradle, which has the property android.enableR8.fullMode to be true by default, minified builds were failing due to missing proguard rules related to Huawei. Suggestion is to add these to the SDK so they are provided by default.
Build a project using the Radar dependency and default Google location services provider with Gradle 8.0+. The build will fail with a message referencing missing Proguard rules:
Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in .../app/build/outputs/mapping/.../missing_rules.txt
Missing rules text file:
# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn com.huawei.hmf.tasks.OnFailureListener
-dontwarn com.huawei.hmf.tasks.OnSuccessListener
-dontwarn com.huawei.hmf.tasks.Task
-dontwarn com.huawei.hms.location.FusedLocationProviderClient
-dontwarn com.huawei.hms.location.Geofence$Builder
-dontwarn com.huawei.hms.location.Geofence
-dontwarn com.huawei.hms.location.GeofenceData
-dontwarn com.huawei.hms.location.GeofenceRequest$Builder
-dontwarn com.huawei.hms.location.GeofenceRequest
-dontwarn com.huawei.hms.location.GeofenceService
-dontwarn com.huawei.hms.location.LocationCallback
-dontwarn com.huawei.hms.location.LocationRequest
-dontwarn com.huawei.hms.location.LocationResult
OS version
Android 14
SDK installation method
Gradle-provided dependency via Maven Central
SDK version
3.8.11
Other information
The text was updated successfully, but these errors were encountered:
In an attempt to replicate, I bumped the gradle for the SDK to 8, and made all the changes required to get the example app to build. I got the example building correctly but without any of the warnings you observed. Here's my work.
Were you able to add the proguard rules to your project? Were you able to successfully build?
Yes, I was able to successfully build after adding the Proguard rules. If the next Radar release will work without them we'll be sure to update. Thank you!
Summary
After updating to use the latest version of Gradle, which has the property
android.enableR8.fullMode
to betrue
by default, minified builds were failing due to missing proguard rules related to Huawei. Suggestion is to add these to the SDK so they are provided by default.Code to reproduce
Gradle 8.0 +
Targeting SDK 34
minifyEnabled true
in build configurationSteps to reproduce
Build a project using the Radar dependency and default Google location services provider with Gradle 8.0+. The build will fail with a message referencing missing Proguard rules:
Missing rules text file:
OS version
Android 14
SDK installation method
Gradle-provided dependency via Maven Central
SDK version
3.8.11
Other information
The text was updated successfully, but these errors were encountered: