Failed to execute aapt

I am new to Android and I am working on phonegap application. I encountered the error in the middle of building my project. I am totally unaware of the problem.
Error:In FontFamilyFont, unable to find attribute android:fontVariationSettings
Error:Execution failed for task ‘:processDebugResources’. Failed to execute aapt
I am using Android Studio 3.0.1 and target sdk version is 27.