Library deprecated

I get this error whenever I try to build my android application :
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

Android resource linking failed
AAPT: error: unexpected element found in .

my current android version : android 9.1.0
gradle version : 6.5
minSdkVersion 21
targetSdkVersion 29