當一個特定的dialogFragment啓動時顯示此異常。我很困惑,因爲它沒有顯示我的任何項目類,因此我不知道如何解決這個問題。此外,我沒有在片段中使用Bitmap
類,所以這實在令人困惑。如何解決這個奇怪的「IllegalArgumentException:位圖大小超過32位」
請問您有解決方案嗎?
09-27 12:11:47.440 4381-4381/com.ozuf.weper E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ozuf.weper, PID: 4381
java.lang.IllegalArgumentException: bitmap size exceeds 32 bits
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:908)
at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
at android.graphics.Bitmap.createBitmap(Bitmap.java:846)
at android.graphics.drawable.RippleDrawable.updateMaskShaderIfNeeded(RippleDrawable.java:691)
at android.graphics.drawable.RippleDrawable.drawBackgroundAndRipples(RippleDrawable.java:803)
at android.graphics.drawable.RippleDrawable.draw(RippleDrawable.java:641)
at android.view.View.getDrawableRenderNode(View.java:15867)
at android.view.View.drawBackground(View.java:15816)
at android.view.View.draw(View.java:15626)
at android.view.View.updateDisplayListIfDirty(View.java:14568)
at android.view.View.getDisplayList(View.java:14590)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3588)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3567)
at android.view.View.updateDisplayListIfDirty(View.java:14528)
at android.view.View.getDisplayList(View.java:14590)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3588)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3567)
at android.view.View.updateDisplayListIfDirty(View.java:14528)
at android.view.View.getDisplayList(View.java:14590)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3588)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3567)
at android.view.View.updateDisplayListIfDirty(View.java:14528)
at android.view.View.getDisplayList(View.java:14590)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3588)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3567)
at android.view.View.updateDisplayListIfDirty(View.java:14528)
at android.view.View.getDisplayList(View.java:14590)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2575)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2385)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2012)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1073)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5988)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
集largeheap真正清單文件 –
@PreetikaKaur請你能解釋一下你的答案? – X09
對於較低版本的設備,內存大小有時會超過這麼難以支持這麼多內存位,這就是爲什麼我們在應用程序標記中的清單文件android:largeHeap =「true」中添加此內容的原因。嘗試一下,如果工作好,否則我們會看到其他一些soln。 –