Search code examples
huawei-mobile-serviceshuawei-developershuawei-map-kit

Error: package com.huawei.hms.maps.util does not exist when using HMS Map SDK 5.1


My Android app worked well with Huawei Map SDK 5.0.0 or lower version. When upgrading to Map SDK 5.0.1 or above version however, I get the error: package com.huawei.hms.maps.util does not exist when using:

import com.huawei.hms.maps.util.LogM;
import com.huawei.hms.maps.util.AssetBitmapDescriptor;

I tried several solutions, but none of them worked. Can someone help?


Solution

  • To resolve the issues on your Android app when using Huawei Map SDK 5.0.1 or above, you need to do the followings:

    1. use Android API android.util.Log to replace com.huawei.hms.maps.util.LogM

    2. for com.huawei.hms.maps.util.AssetBitmapDescriptor, use the corresponding method in BitmapDescriptorFactory to replace it. Please refer to the links for details: Link 1 and link2.