将棋プログラミング

(将棋に関する)ソフトウェア開発のノウハウ等。

2018-07-18から1日間の記事一覧

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application

Androidアプリ開発中に、次のコードを書き、 AlertDialog.Builder ad = new AlertDialog.Builder(getApplicationContext()); 次のエラーが発生した。 android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an appl…

java.lang.NumberFormatException: Invalid int:

最近、Androidアプリ開発中に、サーバから受信したデータを数値化するため、次のコードを書いた。 String str; // サーバから受信したデータ int int_value = Integer.parseInt(str); 実行すると、次の例外が発生した。 java.lang.NumberFormatException: In…