1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question Update to v9.3

Discussion in 'Android Questions' started by LuigiTasca, Jul 22, 2019.

  1. LuigiTasca

    LuigiTasca Member Licensed User

    Good morning,
    After the update to the versione 9.3 I got this error while I compile my project about some imports in my inline Java codes.

    Organizzazione Librerie. (0.49s)
    (AndroidX SDK)
    Generazione file R. (24.98s)
    Compilazione del codice Java prodotto. Error
    javac 1.8.0_144
    src\com\company\proj\backoffice.java:14: error: package android.support.v4.widget does not exist
    import android.support.v4.widget.CompoundButtonCompat;
    ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error



    I imported the recommended items on the SDK manager and then I did jetify on the "jetifier" tool.
    Any suggestion?
    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Inline Java code will not be converted automatically. In most cases it should be very simple to convert it yourself.

    For example you need to replace:
    Code:
    import android.support.v4.widget.CompoundButtonCompat;
    With:
    Code:
    import androidx.core.widget.CompoundButtonCompat;
    There is a file named androidx-class-mapping.csv in the installation folder that maps between the old classes and the new ones.
     
    LuigiTasca and DonManfred like this.
  3. MarcoRome

    MarcoRome Expert Licensed User

  4. LuigiTasca

    LuigiTasca Member Licensed User

    Ok, it works. Thank you so much
     
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