我目前有一个buzztouch Android应用程序的问题我从谷歌播放创建错误
NullPointerException
in BT_viewUtilities.updateBackgroundColorsForScreen()
我已将其缩小到以下代码,是否有人在代码中看到任何类型的错误。如果你需要别的东西请问,这会解决很多应用程序。谢谢
//updates a screens background colors and image...
public static void updateBackgroundColorsForScreen(final Activity theActivity, final BT_item theScreenData){
BT_debugger.showIt(objectName + ":updateBackgroundColorsForScreen with nickname: \"" + theScreenData.getItemNickname() + "\"");
答案 0 :(得分:2)
theScreenData或BT_debugger为空。
答案 1 :(得分:2)
我不知道你的代码在做什么,但修复很简单:
//updates a screens background colors and image...
public static void updateBackgroundColorsForScreen(final Activity theActivity, final BT_item theScreenData){
if(BT_debugger != null && theScreenData != null){
BT_debugger.showIt(objectName + ":updateBackgroundColorsForScreen with nickname: \"" + theScreenData.getItemNickname() + "\"");
} else {
Log.e("YourApp", "Warning null var, command not completed");
}
}
要调试您可以执行的错误:
//updates a screens background colors and image...
public static void updateBackgroundColorsForScreen(final Activity theActivity, final BT_item theScreenData){
if(BT_debugger != null){
if(theScreenData != null){
BT_debugger.showIt(objectName + ":updateBackgroundColorsForScreen with nickname: \"" + theScreenData.getItemNickname() + "\"");
} else {
Log.e("YourApp", "theScreenData was null, command not completed");
}
} else {
Log.e("YourApp", "BT_debugger was null, command not completed");
}
}
答案 2 :(得分:1)
我认为这是导致空点异常的行 - theScreenData.getItemNickname()