猿问

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

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-wal
05-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-wal
05-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: main
05-23 11:47:54.105: E/AndroidRuntime(18983): Process: com.hbqianze.oneyungou, PID: 18983
05-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 reference
05-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 reference
05-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


慕粉2256163147
浏览 2385回答 1
1回答

蒲公英wsg

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()方法监听器是空的,建议打断点掉试一下
随时随地看视频慕课网APP

相关分类

Android
我要回答