这是我得到的错误日志
05-22 17:26:21.519 6097-7568/? E/ActivityManager: applyOptionsLocked:
pendingOptions.getStartX()=23pendingOptions.getStartY()=1168
05-22 17:26:21.531 1883-1883/? E/Zygote: v2
05-22 17:26:21.532 1883-1883/? E/Zygote: accessInfo : 0
05-22 17:26:22.503 1883-1883/? E/AndroidRuntime: FATAL EXCEPTION: main
Process:
classify.domain.com.prinsprem, PID: 1883
java.lang.RuntimeException: Canvas: trying to draw too
large(201326592bytes) bitmap.
at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:260)
at
android.graphics.Canvas.drawBitmap(Canvas.java:1420)
at
android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545)
at android.widget.ImageView.onDraw(ImageView.java:1286)
at android.view.View.draw(View.java:18319)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.draw(View.java:18322)
at com.android.internal.policy.DecorView.draw(DecorView.java:854)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:666)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:672)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:780)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3112)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2908)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2502)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1509)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7051)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
at android.view.Choreographer.doCallbacks(Choreographer.java:702)
at android.view.Choreographer.doFrame(Choreographer.java:638)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
答案 0 :(得分:0)
此错误明确指出您正在尝试渲染非常大的图像, 您可以做的是通过任何图像编辑器应用程序重新缩放图像以减小其大小,并将其复制到您的drawable文件夹中。它会解决你的问题。