无法使用Mapbox SDK 6.7在启用了Pro Guard的情况下生成构建

时间:2018-11-29 14:56:07

标签: mapbox mapbox-android

Mapbox SDK:6.7.0

在gradle中启用proguard后,我们收到以下错误。

com.mapbox.services.android.location.LostLocationEngine: can't find superclass or interface com.mapbox.services.android.telemetry.location.LocationEngine   

com.mapbox.services.android.location.MockLocationEngine: can't find referenced class com.mapbox.services.android.telemetry.location.LocationEngine$Type

我在我的应用程序中使用了LocationComponent,LocationEngine和LocationEngineProvider类。我需要在proguard规则中添加任何内容以生成启用了proguard的构建吗?

在评论这些类的用法时,可以在启用proguard的情况下生成内部版本。

1 个答案:

答案 0 :(得分:1)

尝试在proguard文件中添加以下行

-dontwarn com.mapbox.services.android.location.LostLocationEngine
-dontwarn com.mapbox.services.android.location.MockLocationEngine