Android Question unable to find attribute android:fontVariationSettings

Discussion in 'Android Questions' started by nicieri, Sep 22, 2018.

  1. nicieri

    nicieri Active Member Licensed User

    I have reviewed all the previous posts, I have reinstalled the SDK, I have updated such caual indicated in the instructions.

    I have verified and my path configuration points to:

    C:\Android\platforms\android-27\android.jar

    But this is not the solution.

    I have the most recent version of B4A. (8.30)

    ObfuscatorMap.txt file created in Objects folder.
    Compiling layouts code. (0.05s)
    Organizing libraries. (0.00s)
    Generating R file. Error
    ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings
    ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex
     
    KZero likes this.
  2. nicieri

    nicieri Active Member Licensed User

    I think that all the problem starting because when I installed the new sdk and installed the recommended items.

    The b4a still say me that :

    ObfuscatorMap.txt file created in Objects folder.
    Compiling layouts code. (0.02s)
    Organizing libraries. Error
    Maven artifact not found: com.android.support/collections

    So.. I install in the sdk manually the com.android.support:collections..
    Then B4a ask me for other multiple "com.android.support/............."

    I installed all manually, but now,.. the error of android:fontVariationSettings.. I don't know how to fix it.
     
  3. nicieri

    nicieri Active Member Licensed User

    This problem is only with some projects.

    If I started a new project, this new project don't have the error
     
  4. DonManfred

    DonManfred Expert Licensed User

    Install ndroid 28 SDK with the SDK Manager and set the path t the ndroid.jar respectively in the Ide.
     
  5. nicieri

    nicieri Active Member Licensed User

    I now the problem...

    All the library FireBase.. is the cause of the problem

    also the library "runtimepermissions"


    But I need the library "runtimepermissions".. what can I do??

    If I select this library.. the problem...
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    What is the path of android.jar under Tools - Configure Paths?
     
  7. jo1234

    jo1234 Member Licensed User

    Same here. I updated the Android SDK yesterday and immediately I could not compile my program anymore because com.android.support/collections is lacking.
    I opened the SDK manager from B4A and installed the missing library, but then the next one was missing and so on.
    I completely deinstalled all Android SDKs and deleted C:\Android. Then I downloaded the Android command line tools, opened the Sdk Manager and installed all recommended items.
    Again I have com.android.support/collections lacking.

    My paths:
    C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe
    C:\Android\platforms\android-27\android.jar

    thanks
    Johannes
     
  8. DonManfred

    DonManfred Expert Licensed User

    Install the SDK 28.
    [​IMG]

    2. Change the Android.jar to 28 in tools Configure Paths
    [​IMG]
     
    Alexander Stolte and mpearson like this.
  9. jo1234

    jo1234 Member Licensed User

    Thanks a lot DonManfred!
    Unfortunately, I still get the error:
    Organizing libraries. Error
    Maven artifact not found: com.android.support/collections

    After installing the SDK28 I got:
    Warning: File C:\Users\Johannes\.android\repositories.cfg could not be loaded.

    If I check for collections I see that it has not been installed.
    upload_2018-9-23_9-12-13.png

    I will test more....
     
  10. DonManfred

    DonManfred Expert Licensed User

    Did you install it manually? Do it. Maybe you need to find other new dependencies now. I for myself installed all new mavens with Version 28.0.0....
     
  11. jo1234

    jo1234 Member Licensed User

    Hmm.
    I created an empty C:\Users\Johannes\.android\repositories.cfg file.
    Then I installed manually all com.android.support files.
    Now I can compile but the app crashes when it tries to use a JavaObject :(

    Code:
    Dim span As JavaObject
    span.InitializeNewInstance(
    "android.text.style.LeadingMarginSpan.Standard"Array(FirstAndRest(0), FirstAndRest(1)))
    Dim jo As JavaObject = cs
    jo.RunMethod(
    "open"Array(span))
    java.lang.RuntimeException: Method: open not found in: anywheresoftware.b4a.objects.CSBuilder$1
     
  12. DonManfred

    DonManfred Expert Licensed User

    Sounds like a new issue which should be posted in a new Thread.

    CSBuilder seems not to have a open method.
     
  13. jo1234

    jo1234 Member Licensed User

    That code worked beautifully until yesterday (and is from Erel ;))

    Edit: The code stopped working because I had removed the "CallSub3" from "AddLeadingMarginSpan". In Erel's example it is clearly stated that one should not do this....

    It had nothing to do with the meanwhile fixed Android 28 issue.
     
    Last edited: Sep 23, 2018
  14. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for the CSBuilder related issue.
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    I've updated the list of recommended items. As @DonManfred wrote, the path of android.jar under Tools - Configure Paths should point to android-28.
     
    jo1234 and DonManfred like this.
  16. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    Hello

    I had the same problem this morning, as per @DonManfred I did not have this in my sdk manager
    [​IMG]

    I had to use the old Android SDK manager to install Platform 28 to solve the problem

    Regards

    John.
     
  17. Erel

    Erel Administrator Staff Member Licensed User

    Strange. Make sure to use the latest version of Android SDK command line tools. The link is available in B4A installation page.
     
  18. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    Yep, did that, had to rename the existing tools folder to tools-old as just over writing cause errors in the SDK manager.

    Thanks for the help.
     
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