我的androia应用程序中有actionbarsherlok的问题。(我使用ScrollingTabContainerView创建标签。当我第二次选择当前标签时,我有这个错误
java.lang.NullPointerException
at com.android.internal.widget.ScrollingTabContainerView$1.run(ScrollingTabContainerView.java:247)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
这是什么?我怎么纠正它?
答案 0 :(得分:0)
激活ABS的日志:
在ImageLoaderConfiguration构建器中:
.enableLogging()
然后在onLoadingStarted,onLoadingFailed,onLoadingComplete的回调中,做一些日志以防万一。
例如:
@Override
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
String message = null;
switch (failReason.getType()) {
case IO_ERROR:
message = "Input/Output error";
break;
case DECODING_ERROR:
message = "Image can't be decoded";
break;
case NETWORK_DENIED:
message = "Downloads are denied";
break;
case OUT_OF_MEMORY:
message = "Out Of Memory error";
break;
case UNKNOWN:
message = "Unknown error";
break;
}
Log.e("ImageLoader", "ERROR : " + message);
}
现在执行您的应用程序并过滤您使用ImageLoader记录并查看是否有任何警告/错误