Android Question Class not found and other problems B4A v9.00

Pendrush

Well-Known Member
Licensed User
Longtime User
Libs I'm using in my app:
libs.png
I'm also using B4XLoadingIndicator.bas and B4XDrawer.bas. On app start I get this message:
Class not found: app.debug.b4xloadingindicator, trying: app.debug.myapp.b4xloadingindicator
Declaration is:
B4X:
Private Indikatorx As B4XLoadingIndicator
When I see "Class not found..." message in log, app run fine.
Sometime after app is compiled and started, app crash with this info:
Field Indikatorx was declared with the wrong type
error is triggered inside B4XDrawer (line 228)
B4X:
Public Sub getCenterPanel As B4XView
   Return mCenterPanel '<- line 228 - error: Field Indikatorx was declared with the wrong type
End Sub
After closing B4A and start it again, app compile successful and run as expected, but sometimes I need to clear project multiple times or to restart B4A and compile app again multiple times to be able to run app without error: "Field Indikatorx was declared with the wrong type". It's totally random. Changing Build Configuration also sometimes trigger same error.

Also using latest CustomListView.bas (as class) instead of xCustomListView lib, trigger similar error: "Field clv was declared with the wrong type". As workaround I'm using lib, but with lib I'm not able to customize CLV as I want. I have tried to remove xCustomListView lib and change name of CustomListView.bas to CuLiv.bas and add it again in Designer as CustomView -> CuLiv, but without success, same error is triggered.

None of those problems exist in previous B4A version, only on B4A 9.00
 

Pendrush

Well-Known Member
Licensed User
Longtime User
I have tried multiple times (delete/create) in designer, with multiple names. Same error and same behavior.
Layout is build in Designer from scratch, without Copy/Paste.
I have same problem on multiple project. There is no problem with B4A v8.80.
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
Steps to reproduce error:
1. Compile app on Release (Obfuscated), Build Configuration: Default
2. Right after app start, change Build Configuration to: NotDefault and compile

Error:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 350)
java.lang.RuntimeException: java.lang.RuntimeException: Field b4xloadingindicator1 was declared with the wrong type.
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:292)
at b4a.examplex.main._activity_create(main.java:350)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at b4a.examplex.main.afterFirstLayout(main.java:104)
at b4a.examplex.main.access$000(main.java:17)
at b4a.examplex.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.RuntimeException: Field b4xloadingindicator1 was declared with the wrong type.
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:431)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
... 15 more
** Service (starter) Destroy (ignored)**
** Service (httputils2service) Destroy **
 

Attachments

  • test.zip
    20.2 KB · Views: 191
Upvote 0
Top