Android Question error compiler after update at 9.3 release

Discussion in 'Android Questions' started by Roberto P., Aug 23, 2019.

  1. Roberto P.

    Roberto P. Well-Known Member Licensed User

    Hi all
    I've update at 9.30 release and run the Android sdk\Jetifier and have error in the picture.

    upload_2019-8-23_19-21-32.png

    Please help me.
    thanks
     
  2. DonManfred

    DonManfred Expert Licensed User

    You should switch to androidx
     
  3. Roberto P.

    Roberto P. Well-Known Member Licensed User

  4. DonManfred

    DonManfred Expert Licensed User

  5. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I done all instructions and the files are generated, but have the same error.
    I see that the files AHViewPager.androidx.jar exist!?

    help me
     
  6. DonManfred

    DonManfred Expert Licensed User

    When i started the SDK Manager and updated the components the first time o got a question asking me to switch to AndroidX as it is recommended. I answered with YES.

    Did you answer no?

    Try to put the attached file into your [sdkpath]\extras\b4a_remote folder
     

    Attached Files:

  7. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I not remember my answer!

    I Have the same file in the folder.
     

    Attached Files:

  8. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I've delete the folder b4a_remote and run sdkmanger then I answer Yes, but it not compile in AndroidX!?

    see images

    upload_2019-8-24_11-16-3.png


    this is the result of compilation:

    B4A Version: 9.30
    Java Version: 8
    Parsing code. (1.11s)
    Building folders structure. (0.08s)
    Compiling code. (0.86s)
    Compiling layouts code. (0.08s)
    Organizing libraries. (0.00s)
    (Android Support Library)
    Generating R file. (0.00s)
    Compiling generated Java code. Error
    B4A line: 289
    TabLayout.SetViewPager(VP)
    javac 1.8.0_60
    src\dev\meta\sb\cuserinterface.java:234: error: package androidx.viewpager.widget does not exist
    _tablayout.SetViewPager((androidx.viewpager.widget.ViewPager)(_vp.getObject()));
    ^
    thank in advance
     
  9. DonManfred

    DonManfred Expert Licensed User

    i am not sure what is wrong. You maybe need to wait for another answer, sorry. I can´t help any further.
     
  10. Roberto P.

    Roberto P. Well-Known Member Licensed User

    I tried to install the b4a 9.30 in other computer and now compile regular con AndroidX sdk.
    But I've another error:

    B4A Version: 9.30
    Java Version: 8
    Parsing code. (1.99s)
    Building folders structure. (0.09s)
    Compiling code. (1.57s)
    Compiling layouts code. (0.24s)
    Organizing libraries. (0.02s)
    (AndroidX SDK)
    Generating R file. Error
    Failed to generate resource table for split ''
    c:\android\sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.0.2\unpacked-appcompat-1.0.2\res\values-v28\values-v28.xml:7: error: Error: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    Please try to download the SDK + the required resources: https://www.b4x.com/b4a.html#installation ?
    Download them into a new folder and make sure that the IDE is configured to use the new SDK (path to android.jar).
     
  12. Roberto P.

    Roberto P. Well-Known Member Licensed User

    done, but there are still problems

    B4A Version: 9.30
    Java Version: 8
    Parsing code. (1.28s)
    Building folders structure. (0.10s)
    Compiling code. (0.93s)
    Compiling layouts code. (0.12s)
    Organizing libraries. (0.00s)
    (AndroidX SDK)
    Generating R file. (0.00s)
    Compiling generated Java code. Error
    B4A line: 241
    PC.AddPage(View, Title)
    javac 1.8.0_60
    src\dev\meta\sb\cuserinterface.java:186: error: cannot access PagerAdapter
    _pc.AddPage((android.view.View)(_view.getObject()),_title);
    ^
    class file for android.support.v4.view.PagerAdapter not found
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    This error means that you are using a library that was not "jetified". Maybe AHPageViewer.

    Make sure that it is not in the internal libraries folder, run the jetifier tool and clean the project (Ctrl + P).
     
  14. Roberto P.

    Roberto P. Well-Known Member Licensed User

    thank you Erel
    i resolved the problem with the sdk command line. Now work fine and not have it any problem

    regards
     
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