无法使用Mapbox SDK 6.7在启用了Pro Guard的情况下生成内部版本 [英] Unable to generate build with pro guard enabled using Mapbox SDK 6.7
本文介绍了无法使用Mapbox SDK 6.7在启用了Pro Guard的情况下生成内部版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Mapbox SDK:6.7.0
Mapbox SDK: 6.7.0
在gradle中启用proguard后,我们收到以下错误.
After enabling the proguard in the gradle, we are getting the following error.
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的构建吗?
I have used LocationComponent, LocationEngine and LocationEngineProvider classes in my application. Do I need to add anything in proguard rules to generate a build with proguard enabled?
在评论这些类的用法时,可以在启用proguard的情况下生成内部版本.
On commenting usages of these class, the build can be generated with proguard enabled.
推荐答案
尝试在proguard文件中添加以下行
Try adding the below lines in proguard file
-dontwarn com.mapbox.services.android.location.LostLocationEngine
-dontwarn com.mapbox.services.android.location.MockLocationEngine
这篇关于无法使用Mapbox SDK 6.7在启用了Pro Guard的情况下生成内部版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文