我做了一個新的構建(週末後)和我的應用程序崩潰與下面的例外。有趣的部分是,我上週用相同的配置進行了構建,沒有任何代碼更改,然後工作。該應用程序在模擬器上運行良好,但在我的Samsung Galaxy Tab 2 10.1中引發異常。 我正在使用Android Studio 1.5.1。有人面臨同樣的問題嗎?應用程序開始在設備上的空指針異常
12-21 14:19:27.359 6142-6142/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at android.view.View.getHardwareLayer(View.java:10225)
at android.view.ViewGroup.drawChild(ViewGroup.java:2863)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10462)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10462)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:11028)
at android.view.View.getDisplayList(View.java:10464)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.draw(View.java:11028)
at android.widget.FrameLayout.draw(FrameLayout.java:450)
at android.view.View.getDisplayList(View.java:10464)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10462)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10462)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10462)
at android.view.ViewGroup.drawChild(ViewGroup.java:2850)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
at android.view.View.getDisplayList(View.java:10462)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:840)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:1923)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1647)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2459)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4514)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
您是否嘗試在重新安裝之前清理項目並從設備上卸載應用程序? –
另請確保您沒有指定平板電腦的佈局。如果你這樣做,確保它有適當的意見。 –
我做了一個乾淨的安裝,刪除從新設備的應用程序(與項目乾淨)。 該應用沒有指定平板電腦的佈局。 – Gex