2017-08-07 123 views
1

因此,我剛剛首次將我的應用程序上傳到Google Play商店(在Alpha中)。從Google Play Store安裝應用程序後,應用程序崩潰

但是,當我安裝並打開應用程序,它崩潰。然而,如果我只是通過Android Studio運行它,它工作得很好。

這是火力地堡崩潰報告說,導致崩潰的錯誤:

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference 
android.support.design.widget.CoordinatorLayout.onLayout (CoordinatorLayout.java) 
android.view.View.layout (View.java:18793) 
android.view.ViewGroup.layout (ViewGroup.java:5952) 
android.support.v4.widget.DrawerLayout.onLayout (DrawerLayout.java) 
android.view.View.layout (View.java:18793) 
android.view.ViewGroup.layout (ViewGroup.java:5952) 
android.widget.FrameLayout.layoutChildren (FrameLayout.java:323) 
android.widget.FrameLayout.onLayout (FrameLayout.java:261) 
android.view.View.layout (View.java:18793) 
android.view.ViewGroup.layout (ViewGroup.java:5952) 
android.widget.LinearLayout.setChildFrame (LinearLayout.java:1741) 
android.widget.LinearLayout.layoutVertical (LinearLayout.java:1585) 
android.widget.LinearLayout.onLayout (LinearLayout.java:1494) 
android.view.View.layout (View.java:18793) 
android.view.ViewGroup.layout (ViewGroup.java:5952) 
android.widget.FrameLayout.layoutChildren (FrameLayout.java:323) 
android.widget.FrameLayout.onLayout (FrameLayout.java:261) 
android.view.View.layout (View.java:18793) 
android.view.ViewGroup.layout (ViewGroup.java:5952) 
android.widget.LinearLayout.setChildFrame (LinearLayout.java:1741) 
android.widget.LinearLayout.layoutVertical (LinearLayout.java:1585) 
android.widget.LinearLayout.onLayout (LinearLayout.java:1494) 
android.view.View.layout (View.java:18793) 
android.view.ViewGroup.layout (ViewGroup.java:5952) 
android.widget.FrameLayout.layoutChildren (FrameLayout.java:323) 
android.widget.FrameLayout.onLayout (FrameLayout.java:261) 
com.android.internal.policy.DecorView.onLayout (DecorView.java:818) 
android.view.View.layout (View.java:18793) 
android.view.ViewGroup.layout (ViewGroup.java:5952) 
android.view.ViewRootImpl.performLayout (ViewRootImpl.java:2625) 
android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2341) 
android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1493) 

什麼導致這個錯誤?如果我的類中沒有列出此錯誤,我怎麼能推斷出問題所在?

+1

您是否嘗試過從android studio運行發佈版本? – lelloman

+0

@lelloman我如何特別運行發佈版本?我習慣於點擊綠色的播放按鈕。在android studio左邊的 – user849651

+0

你應該看到一個大寫的按鈕「Build Variants」,你可以在那裏選擇構建類型然後運行。如果找不到按鈕,請快速按兩次移動鍵並搜索「Build Variants」 – lelloman

回答

0

找到解決方案:

我正在使用Retrofit以及一些POJO模型類。我需要將以下行添加到proguard-rules.pro文件中:

-keep class package.to.models.** { *; } 
相關問題