升级 Bugtags Android SDK 2.0 版本出现的问题解决方案

某些用户升级 Bugtags SDK 遇到类似问题:

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.bugtags.library.agent.instrumentation.HttpInstrumentation"

请参考如下方式解决问题。

1. 升级 Bugtags SDK

compile 'com.bugtags.library:bugtags-lib:latest.integration'

2. 升级 Bugtags Gradle 插件

classpath 'com.bugtags.library:bugtags-gradle:latest.integration'

3. 修改混淆规则

# ProGuard configurations for Bugtags
  -keepattributes LineNumberTable,SourceFile

  -keep class com.bugtags.library.** {*;}
  -dontwarn com.bugtags.library.**
  -keep class io.bugtags.** {*;}
  -dontwarn io.bugtags.**
  -dontwarn org.apache.http.**
  -dontwarn android.net.http.AndroidHttpClient

  # End Bugtags

4. clean app 重新 build

Mac:

./gradlew clean

Windows:

gradlew clean

如果还有问题,请尝试重启 AS,或者联系客服 QQ 群:126207501。