Android Question java.lang.RuntimeException: Unable to create service (SOLVED)

Colin Evans

Active Member
Licensed User
Hi, I am revisiting an old app to make some changes but even though it was working fine before I now cannot compile / run the program as I get the following error
B4X:
Logger connected to:  Ulefone Armor_6E
--------- beginning of crash
--------- beginning of main
--------- beginning of system
java.lang.RuntimeException: Unable to create service octopus.agile.energy.starter: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3575)
    at android.app.ActivityThread.access$1400(ActivityThread.java:206)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1694)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6702)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at octopus.agile.energy.starter.onCreate(starter.java:39)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:3563)
    ... 8 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at octopus.agile.energy.starter.onCreate(starter.java:37)
    ... 9 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to read from field 'octopus.agile.energy.main octopus.agile.energy.settings._main' on a null object reference
    at octopus.agile.energy.main.initializeProcessGlobals(main.java:681)
    ... 11 more
Caused by: java.lang.NullPointerException: Attempt to read from field 'octopus.agile.energy.main octopus.agile.energy.settings._main' on a null object reference
    at octopus.agile.energy.settings._process_globals(settings.java:604)
    at octopus.agile.energy.main.initializeProcessGlobals(main.java:670)
    ... 11 more
Any idea's what has gone wrong, the only thing that has changed is the upgrade to B4A
 
Top