Android Question [SOLVED] App works on debug mode but fail on release compilation.

nicodh

Member
Licensed User
Longtime User
I have an app that works fine in my phone when i compile on debug mode but fails to work on release compilation.

I got an error on a textview.

I 'm running the 3.2 version of the soft. Registered of course. The debug version does not fit so here is the link : https://www.dropbox.com/s/b8hz588rjd9hg7m/Seria_RAPID_DEBUG.apk

The exact error is:

Error occurred
An error has ocurred in sub:main_popu(java line:4135) java.lang.ClassCastException:nicodh.bgcConfig.table cannot be cast to android.widget.Textview
Continue?


Can you help me?
Thanks
 

Attachments

  • release version.apk
    469.2 KB · Views: 204
Last edited:

nicodh

Member
Licensed User
Longtime User
and the logcat give me this:

main_popup (java line: 4135)
java.lang.ClassCastException: nicodh.bgcConfig.table cannot be cast to android.widget.TextView


at nicodh.bgcConfig.main._popup(main.java:4135)
at nicodh.bgcConfig.main._motortable_cellclick(main.java:3739)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:858)
at anywheresoftware.b4a.keywords.Common.CallSubNew3(Common.java:823)
at nicodh.bgcConfig.table._cell_click(table.java:214)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:157)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66)
at android.view.View.performClick(View.java:4084)
at android.view.View$PerformClick.run(View.java:16966)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4931)
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:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)
java.lang.ClassCastException: nicodh.bgcConfig.table cannot be cast to android.widget.TextView
 
Upvote 0

nicodh

Member
Licensed User
Longtime User
Well after fighting with this problem i finally found the solution. Problem was on a sub size + a label not being interpreted as a label, so i changed the line and everything seems to work now.
Thanks anyway for the help.

for some reason when i was in debug this line worked:

Sub popup(quetabla As String, col As Int, row As Int)
Dim l As label
l = Sender

where l is a label coming from a fexible table. In release mode i got an error from here.
So i changed to Object and problem was solved. Everything runs smooth now.
 
Upvote 0
Top