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

Discussion in 'Android Questions' started by Pendrush, Apr 9, 2019.

  1. Pendrush

    Pendrush Well-Known Member Licensed 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:
    Declaration is:
    Code:
    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:
    error is triggered inside B4XDrawer (line 228)
    Code:
    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
     
  2. DonManfred

    DonManfred Expert Licensed User

    open the layout, remove the view. Add it again, save the layout.

    I guess you did copy a layoutfile from one app (example?) to your app instead of building a new layout)!?
     
    BillMeyer likes this.
  3. Pendrush

    Pendrush Well-Known Member Licensed 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.
     
  4. DonManfred

    DonManfred Expert Licensed User

    Upload a small project which shows the issue
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Remove CustomListView module.
    Remove B4XLoadingIndicator module.
    Uncheck CustomListView library (xCustomListView is fine).

    Check XUI Views library.
     
  6. Pendrush

    Pendrush Well-Known Member Licensed 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:
     

    Attached Files:

  7. Erel

    Erel Administrator Staff Member Licensed User

    It is related to the package name change. It will work if you clean the project (Ctrl + P) after you change the build configuration.

    It will be fixed for the next update.
     
    Pendrush likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice