为了账号安全,请及时绑定邮箱和手机立即绑定

使用的是注解框架,内存溢出就报这个错,求大神帮忙看下

使用的是注解框架,内存溢出就报这个错,求大神帮忙看下

慕粉2256163147 2017-05-23 11:51:33
05-23 11:47:39.065: E/SQLiteLog(18983): (283) recovered 5 frames from WAL file /data/data/com.hbqianze.oneyungou/databases/xUtils_http_cookie.db-wal05-23 11:47:43.235: E/SQLiteLog(18983): (283) recovered 19 frames from WAL file /data/data/com.hbqianze.oneyungou/databases/xUtils_http_cache.db-wal05-23 11:47:54.045: E/art(18983): Throwing OutOfMemoryError "Failed to allocate a 37748748 byte allocation with 16777216 free bytes and 32MB until OOM"05-23 11:47:54.105: E/art(18983): Throwing OutOfMemoryError "Failed to allocate a 37748748 byte allocation with 16777216 free bytes and 32MB until OOM"05-23 11:47:54.105: E/AndroidRuntime(18983): FATAL EXCEPTION: main05-23 11:47:54.105: E/AndroidRuntime(18983): Process: com.hbqianze.oneyungou, PID: 1898305-23 11:47:54.105: E/AndroidRuntime(18983): java.lang.RuntimeException: Unable to resume activity {com.hbqianze.oneyungou/com.hbqianze.oneyungou.ProductInfoActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.handmark.pulltorefresh.library.PullToRefreshScrollView.setOnRefreshListener(com.handmark.pulltorefresh.library.PullToRefreshBase$OnRefreshListener2)' on a null object reference05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3069)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3100)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2468)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.ActivityThread.access$900(ActivityThread.java:175)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.os.Handler.dispatchMessage(Handler.java:102)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.os.Looper.loop(Looper.java:135)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.ActivityThread.main(ActivityThread.java:5400)05-23 11:47:54.105: E/AndroidRuntime(18983):     at java.lang.reflect.Method.invoke(Native Method)05-23 11:47:54.105: E/AndroidRuntime(18983):     at java.lang.reflect.Method.invoke(Method.java:372)05-23 11:47:54.105: E/AndroidRuntime(18983):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1037)05-23 11:47:54.105: E/AndroidRuntime(18983):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)05-23 11:47:54.105: E/AndroidRuntime(18983): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.handmark.pulltorefresh.library.PullToRefreshScrollView.setOnRefreshListener(com.handmark.pulltorefresh.library.PullToRefreshBase$OnRefreshListener2)' on a null object reference05-23 11:47:54.105: E/AndroidRuntime(18983):     at com.hbqianze.oneyungou.ProductInfoActivity.init(ProductInfoActivity.java:98)05-23 11:47:54.105: E/AndroidRuntime(18983):     at com.hbqianze.oneyungou.ProductInfoActivity.onResume(ProductInfoActivity.java:87)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1266)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.Activity.performResume(Activity.java:6169)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.Activity.performResume(Activity.java:6364)05-23 11:47:54.105: E/AndroidRuntime(18983):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3054)05-23 11:47:54.105: E/AndroidRuntime(18983):     ... 11 more
查看完整描述

1 回答

?
蒲公英wsg

TA贡献242条经验 获得超126个赞

oom:out of memory。内存溢出这是个大问题,也不知道你怎么写的?

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.handmark.pulltorefresh.library.PullToRefreshScrollView.setOnRefreshListener(com.handmark.pulltorefresh.library.PullToRefreshBase$OnRefreshListener2)' on a null object reference


这个你应该知道,空指针异常。

你使用了PullToRefresh,setOnRefreshListener()方法监听器是空的,建议打断点掉试一下

查看完整回答
反对 回复 2017-07-02
  • 1 回答
  • 0 关注
  • 2384 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号