求大神解答,最近在开发一个安卓五子棋项目,一直是这个错误,我就知道是空指针,不知道怎么解决
01-0208:41:14.643:E/AndroidRuntime(5368):FATALEXCEPTION:main01-0208:41:14.643:E/Andro...
01-02 08:41:14.643: E/AndroidRuntime(5368): FATAL EXCEPTION: main
01-02 08:41:14.643: E/AndroidRuntime(5368): java.lang.NullPointerException
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.example.fivechess.board.ChessBoard.setMode(ChessBoard.java:153)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.example.fivechess.board.ChessBoard.start(ChessBoard.java:206)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.example.fivechess.GameViewActivity$PlaceholderFragment$1$1.onClick(GameViewActivity.java:161)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at android.os.Handler.dispatchMessage(Handler.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at android.os.Looper.loop(Looper.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at android.app.ActivityThread.main(ActivityThread.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at java.lang.reflect.Method.invokeNative(Native Method)
01-02 08:41:14.643: E/AndroidRuntime(5368): at java.lang.reflect.Method.invoke(Method.java:511)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at dalvik.system.NativeStart.main(Native Method) 展开
01-02 08:41:14.643: E/AndroidRuntime(5368): java.lang.NullPointerException
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.example.fivechess.board.ChessBoard.setMode(ChessBoard.java:153)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.example.fivechess.board.ChessBoard.start(ChessBoard.java:206)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.example.fivechess.GameViewActivity$PlaceholderFragment$1$1.onClick(GameViewActivity.java:161)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at android.os.Handler.dispatchMessage(Handler.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at android.os.Looper.loop(Looper.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at android.app.ActivityThread.main(ActivityThread.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at java.lang.reflect.Method.invokeNative(Native Method)
01-02 08:41:14.643: E/AndroidRuntime(5368): at java.lang.reflect.Method.invoke(Method.java:511)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
01-02 08:41:14.643: E/AndroidRuntime(5368): at dalvik.system.NativeStart.main(Native Method) 展开
1个回答
享知信息
2023-09-21 广告
2023-09-21 广告
敏捷开发是一种快速响应变化的方法,旨在提高软件开发的效率和灵活性。以下是一些常用的免费敏捷开发工具:1. Trello:一款灵活的看板工具,可用于敏捷项目管理和任务跟踪。2. JIRA Agile:一款功能强大的敏捷项目管理工具,支持看板和...
点击进入详情页
本回答由享知信息提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询