1
真當我在的build.gradle文件中添加minifyEnable:true
釋放buildType,該應用程序崩潰與此日誌下:minifyEnabled:在發佈應用程序崩潰的支持V4
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v4.view.ViewPager.getCurrentItem()' on a null object reference
at com.myapp.springindicator.SpringIndicator.createPoints(Unknown Source)
at com.myapp.springindicator.SpringIndicator.onLayout(Unknown Source)
at android.view.View.layout(View.java:16636)
at android.view.ViewGroup.layout(ViewGroup.java:5437)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1735)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1579)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1488)
at android.view.View.layout(View.java:16636)
at android.view.ViewGroup.layout(ViewGroup.java:5437)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1735)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1579)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1488)
...
有人能幫助我嗎?我已經在ProGuard的文件中添加了這個:
-keep class android.support.v4.app.** { *; } -keep interface android.support.v4.app.** { *; } -keep class android.support.v7.app.** { *; } -keep interface android.support.v7.app.** { *; }
我也跟上應用程序類嘗試
右崩潰了!謝謝! – Rubber
很高興聽到。接受答案也是值得的! = D –
謝謝,它幫助xD – user25