启用Progurad后Android应用程序获取NullPointerException

时间:2018-03-27 06:30:16

标签: android proguard android-proguard

启用Progurad后会出现NullPointerException。

在应用程序中使用依赖项" com.github.igalata:Bubble-Picker:v0.2.4 "。添加此依赖项后,在尝试使用时获取NullPointer异常。

FATAL EXCEPTION: GLThread 4318
 Process: com.manoramaonline.week, PID: 20029
 java.lang.NullPointerException
 at org.a.d.l.a(World.java:198)
 at org.a.d.d.a(ContactManager.java:108)
 at org.a.b.a.a.a(BroadPhase.java:187)
 at org.a.d.d.a(ContactManager.java:152)
 at org.a.d.l.a(World.java:540)
 at com.igalata.bubblepicker.physics.Engine.move(Engine.kt:129)
 at com.igalata.bubblepicker.rendering.PickerRenderer.onDrawFrame(PickerRenderer.kt:72)
 at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
 at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

我试过

  • -keep class com.github。** {*; }
  • -keep class com.igalata.bubblepicker。** {*; }
  • -keep interface com.igalata.bubblepicker。** {*; }
  • -keep enum com.igalata.bubblepicker。** {*; }

  • -keep class com.github.igalata。** {*; }

  • -keep interface com.github.igalata。** {*; }
  • -keep enum com.github.igalata。** {*; }

  • -keep class com.igalata.bubblepicker.physics.Engine.move。** {*; }

  • -keep class com.igalata.bubblepicker.rendering.PickerRenderer.onDrawFrame。** {*; }

但没有工作

2 个答案:

答案 0 :(得分:0)

请尝试将以下内容添加到您的Proguard文件中:

  

-keep public class com.igalata.bubblepicker。**

答案 1 :(得分:0)

试试这个让我知道:

-keep class com.igalata.bubblepicker.**
-dontwarn com.igalata.bubblepicker.**