Skip to main content

Cordova build errors

Had this unusual errors crop up when building a cordova app for android. This started appearing after I installed cordova-plugin-file-opener2.

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

Going through platforms/android/ file, I realized that there was something quite odd about it.

There were multiple versions of the same library being defined.

I removed the last three lines -- library.4, library.5 & library.6, ensuring that the the highest version of library is linked. (At this stage I'm not sure what's the impact of and its contents. But I'm assuming it's being used by the build system to do something similar to linking in the traditional C build system).

Anyway voila the problems disappeared!