Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings #203

Closed
Kals5 opened this issue Mar 13, 2018 · 8 comments

Comments

@Kals5
Copy link

Kals5 commented Mar 13, 2018

I'm getting these two errors while compiling for the Android platform -

ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex
Can anyone please help me figure out why this could be happening?

Thanks in Advance!!

@devjoks
Copy link

devjoks commented Mar 14, 2018

This errors is 'cause exist a update in the android.support and this plugin use:

<framework src="com.android.support:support-v4:+" />

that break the compilation with that error.

#199 - same error
#198 - PR with the correction

@draganstojanov
Copy link

My android platform was 6.2.3. When i replaced with 6.3.0, error disappeared.
Please, try this. Good luck!

@richardshergold
Copy link

I am getting this error as well - android cordova platform is 7.0.0

I tried the option 2 fix here:

https://stackoverflow.com/questions/49162538/running-cordova-build-android-unable-to-find-attribute-androidfontvariation

but it made no difference.

@jaydeepk3
Copy link

My android platform is 6.3.0 but still facing this issue.

@richardshergold
Copy link

I fixed this by editing platform/android/properties file and removing the com.android.support:support-v4 entry and updating the om.android.support:support-v13 entry to:

cordova.system.library.2=com.android.support:support-v13:27.0.1

@lechenging
Copy link

如果方法一不行,可以考虑在项目下搜索com.android.support:support-v4:+。把所有插件com.android.support:support-v4:+替换为com.android.support:support-v4:27.1.0。

com.android.support:support-v4:+的意思是使用最新版,这些目的就是让com.android.support:support-v4固定在27.1.0,而不是使用最新的28.0.0

@moradec
Copy link

moradec commented Apr 6, 2018

Should be changed in the plugin.xml

<preference name="ANDROID_SUPPORT_V13_VERSION" default="27.+"/>
<framework src="com.android.support:support-v13:$ANDROID_SUPPORT_V13_VERSION" />

@shnist
Copy link
Collaborator

shnist commented Dec 14, 2018

hi @Kals5, thanks for raising this issue. I believe that this issue has now been resolved with release 2.1.0 of the plugin, as you can now optionally set the android v4 support to what value you need:
cordova plugin add cordova-plugin-file-opener2 --variable ANDROID_SUPPORT_VERSION={required version}

Having done some research, I think it's fine to keep the android support library at v4, as that seems to be a historical thing (see https://developer.android.com/topic/libraries/support-library/#api-versions). If I've misinterpreted this please let me know.

@shnist shnist closed this as completed Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants