Android Question unable to find attribute android:fontVariationSettings

nicieri

Active Member
Licensed User
Longtime 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
 

nicieri

Active Member
Licensed User
Longtime 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.
 
Upvote 0

nicieri

Active Member
Licensed User
Longtime User
This problem is only with some projects.

If I started a new project, this new project don't have the error
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
but now,.. the error of android:fontVariationSettings.. I don't know how to fix it.
Install ndroid 28 SDK with the SDK Manager and set the path t the ndroid.jar respectively in the Ide.
 
Upvote 0

nicieri

Active Member
Licensed User
Longtime 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...
 
Upvote 0

jo1234

Active Member
Licensed User
Longtime 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
 
Upvote 0

jo1234

Active Member
Licensed User
Longtime 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....
 
Upvote 0

jo1234

Active Member
Licensed User
Longtime 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 :(

B4X:
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
 
Upvote 0

jo1234

Active Member
Licensed User
Longtime 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:
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hello

I had the same problem this morning, as per @DonManfred I did not have this in my sdk manager
sdk28_017.png


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

Regards

John.
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User
Strange. Make sure to use the latest version of Android SDK command line tools. The link is available in B4A installation page.

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.
 
Upvote 0
Top