Android Question in degug mode is OK but not in Release mode

elEdu

New Member
Licensed User
what am I doing wrong?
Thank you

this is the error :


java.lang.RuntimeException: Unable to create service b4a.example.starter: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2373)
at android.app.ActivityThread.access$1600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at b4a.example.starter.onCreate(starter.java:37)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2363)
... 10 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at b4a.example.starter.onCreate(starter.java:35)
... 11 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at b4a.example.main.initializeProcessGlobals(main.java:462)
... 14 more
Caused by: java.lang.NullPointerException
at b4a.example.jugadores._process_globals(jugadores.java:497)
at b4a.example.main.initializeProcessGlobals(main.java:451)
... 14 more
 

eduardopastor70

New Member
i just find the solution. the problem was to assign the value in the Process_Globals sub.

before (bad)


Sub Process_Globals
Dim s As SQL =Main.s
Dim c As Cursor =Main.c
End Sub

now (all right)

Sub Process_Globals
Dim s As SQL
Dim c As Cursor
End Sub

Sub Activity_Create(FirstTime As Boolean)

s =Main.s
c =Main.c
.....

Thank you
 
Upvote 0
Top