Why is my JSONObject related unit test failing?

前端 未结 3 515
天涯浪人
天涯浪人 2020-12-08 18:34

I\'m running my tests using gradle testFlavorType

JSONObject jsonObject1 = new JSONObject();
JSONObject jsonObject2 = new JSONObject();
jsonObje         


        
3条回答
  •  鱼传尺愫
    2020-12-08 19:16

    Well, my first hunch would be that your getMessage() method returns null. You could show the body of that method in your question and have us find the answer for you, but you should probably research how to debug android applications using breakpoints.
    That way you can run your code step by step and see the values of each variable at every step. That would show you your problem in no time, and it's a skill you should definitely master as soon as possible if you intend to get seriously involved in programming.

提交回复
热议问题