Logcat文件说明

时间:2015-01-25 21:07:29

标签: java android logcat

我知道这是一个值得问的合格问题,但我在logcat中收到错误而且我不知道解决它的问题,我认为它必须做java溢出堆内存。代码包含带有图像和文本的java中的水平滚动。代码粘贴在

下面
  01-25 21:03:14.535: D/AndroidRuntime(22306): Shutting down VM
01-25 21:03:14.535: W/dalvikvm(22306): threadid=1: thread exiting with uncaught exception (group=0x415ddce0)
01-25 21:03:14.535: E/AndroidRuntime(22306): FATAL EXCEPTION: main
01-25 21:03:14.535: E/AndroidRuntime(22306): Process: com.example.buttondemo, PID: 22306
01-25 21:03:14.535: E/AndroidRuntime(22306): java.lang.OutOfMemoryError
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:594)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:429)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:840)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.content.res.Resources.loadDrawable(Resources.java:2249)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.content.res.Resources.getDrawable(Resources.java:733)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.content.res.Resources.getDrawable(Resources.java:711)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.widget.ImageView.resolveUri(ImageView.java:636)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.widget.ImageView.setImageResource(ImageView.java:366)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at com.example.buttondemo.ViewPagerAdapter.instantiateItem(ViewPagerAdapter.java:78)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:837)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.support.v4.view.ViewPager.populate(ViewPager.java:1053)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.support.v4.view.ViewPager.populate(ViewPager.java:919)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.support.v4.view.ViewPager$3.run(ViewPager.java:249)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.support.v4.view.ViewPager.completeScroll(ViewPager.java:1766)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:1901)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1859)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2329)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1568)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.app.Activity.dispatchTouchEvent(Activity.java:2458)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.support.v7.app.ActionBarActivityDelegateICS$WindowCallbackWrapper.dispatchTouchEvent(ActionBarActivityDelegateICS.java:268)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2277)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.View.dispatchPointerEvent(View.java:7893)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3950)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3829)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3395)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3445)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3414)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3521)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3422)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3578)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3395)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3445)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3414)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3422)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3395)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5535)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5515)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5486)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5615)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.os.MessageQueue.nativePollOnce(Native Method)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.os.MessageQueue.next(MessageQueue.java:138)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.os.Looper.loop(Looper.java:123)
01-25 21:03:14.535: E/AndroidRuntime(22306):    at android.app.ActivityThread.main(ActivityThread.java:5146)

1 个答案:

答案 0 :(得分:0)

这里的主要问题是,像SLaks说的那样,你的形象太大了。这是一个问题,解释如何解决它: How to deal with "java.lang.OutOfMemoryError: Java heap space" error (64MB heap size)