AAPT: No resource found that matches the given name ‘xxx’

Time:2019-12-2

The app compat-v7 package should be used in the project. After the adt22.6.0 version, the library is available. This is a compatible package of Google’s own. It can make all 4.0 interfaces above 2.1 be used, such as actionbar. It is no longer necessary to use the third-party expense library.
Add dependency:

compile ‘com.android.support:appcompat-v7:23.1.1′

After adding the 23.1.1 version of appcompat, some errors occurred

/app/build/intermediates/res/merged/etcp/debug/values-v21/values-v21.xml:176 : AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.CompoundButton.RadioButton'.

/Users/jjz/Documents/.../app/build/intermediates/res/merged/.../debug/values-v21/values-v21.xml:177 : AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'.

/Users/jjz/Documents/.../app/build/intermediates/res/merged/.../debug/values-v21/values-v21.xml:181 : AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ImageButton'.
....

Added after API 19appcompact_v7, appcompact? V7 will reference the resource content from your SDK. The error is reported here because the content of v21 is not found. If you want to compile appcompact? V7, you’d better use the latest SDK API. Later, I’ll see that my compilesdkversion is 19.
You need to upgrade appcompact? V7 to the latest 23.

compileSdkVersion 23