0

現在、Google Play からエラーを作成したバズタッチ 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() + "\""); 
4

3 に答える 3

2

ScreenDataまたはBT_debuggerのいずれかがnullです。

于 2012-05-24T19:24:25.790 に答える
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");
         }
    }
于 2012-05-24T19:28:41.753 に答える
1

これは、null ポイントの例外が発生する行だと思います-theScreenData.getItemNickname()

于 2012-05-24T19:28:13.690 に答える