【问题标题】:Unable to generate build with pro guard enabled using Mapbox SDK 6.7使用 Mapbox SDK 6.7 启用 pro Guard 时无法生成构建
【发布时间】:2018-11-29 14:56:07
【问题描述】:

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 的情况下生成构建。

【问题讨论】:

    标签: mapbox mapbox-android


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2013-08-07
      • 2018-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-02
      • 2014-03-30
      • 2016-07-08
      相关资源
      最近更新 更多