Android:java.lang.NullPointerException

Android:java.lang.NullPointerException,android,buzztouch,Android,Buzztouch,我目前有一个buzztouch android应用程序的问题,我创建的错误来自google play NullPointerException in BT_viewUtilities.updateBackgroundColorsForScreen() 我已经把它缩小到下面的代码,是否有人在代码中看到任何类型的错误。如果你需要其他东西,请询问,这将修复相当多的应用程序。多谢各位 //updates a screens background colors and image... public s

我目前有一个buzztouch android应用程序的问题,我创建的错误来自google play

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() + "\""); 

screenda或BT_调试器为空。

screenda或BT_调试器为空。

我认为这是导致空点异常的行screenda.getItem昵称()

我认为这是导致空点异常的行screenda.getItem昵称()

我不知道您的代码在做什么,但修复方法很简单:

//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");
         }
    }

我不知道您的代码在做什么,但修复方法很简单:

//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");
         }
    }

我不知道你说“缩小范围”是什么意思,但这里有一个提示:空指针带有一个行号,告诉你问题发生在哪一行。原因:java.lang.NullPointerException位于com.idragracenews.BT_viewUtilities.UpdateBackgroundColorsScreen(BT_viewUtilities.java:37)“这是第37行”BT_debugger.showIt(objectName+”:昵称为“\”“+theScreenData.GetItem昵称()+”\”);“我不知道你说“缩小范围”是什么意思”但这里有一个提示:nullpointer附带一个行号,告诉您问题发生在哪一行。'原因:com.idragracenews.BT_viewUtilities.UpdateBackgroundColorsScreen(BT_viewUtilities.java:37)'这里是第37行'BT_debugger.showIt(objectName+“:UpdateBackgroundColors用于昵称为:\”“+TheScreenda.GetItem昵称()+“\”);“为什么你会这样想,问我为什么也这样做。为什么你会这样想,问我为什么也这样做。”。