ScoreNinja causes java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

后端 未结 2 938
长发绾君心
长发绾君心 2021-01-22 10:15

I\'m trying to add ScoreNinja, the global high score system, to my Android game, and it works fine when I load it on my phone, but when I release it into the wild, I got crash r

2条回答
  •  余生分开走
    2021-01-22 10:48

    I'm still not sure what was wrong, but for anyone who has the same problem, it works fine if you break up your game into a menu Activity and a game Activity. Have the game activity return a score to the menu activity on a game over, then call all the ScoreNinja stuff from the menu activity.

提交回复
热议问题