1

I create an application codename one. I want to connect it with the data base through json. I tetsted the service and I found ths error

Exception in thread "main" java.lang.NullPointerException
    at com.codename1.io.NetworkManager.isAPSupported(NetworkManager.java:909)
    at com.codename1.io.ConnectionRequest.<init>(ConnectionRequest.java:352)
    at Services.ChallengeService.getList(ChallengeService.java:26)
    at Services.test.main(test.java:22)
Java Result: 1
Til
  • 5,150
  • 13
  • 26
  • 34
  • 1
    The closing of this is incorrect as this exception is thrown in Codename One so the "duplicate" answer isn't correct. The right answer is that your test case isn't correct. It uses a main method and Codename One applications don't have a main method. They have a lifecycle object, during the setup of that lifecycle object the implementation is initialized. This didn't happen here since main doesn't do that. – Shai Almog Apr 28 '19 at 03:13

0 Answers0