pwlin / cordova-plugin-file-opener2

A File Opener Plugin for Cordova
MIT License
314 stars 584 forks source link

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

Closed Kals5 closed 5 years ago

Kals5 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

richardshergold commented 6 years ago

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 commented 6 years ago

My android platform is 6.3.0 but still facing this issue.

richardshergold commented 6 years ago

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 commented 6 years ago

如果方法一不行,可以考虑在项目下搜索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 commented 6 years ago

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 commented 5 years ago

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.