依赖v7包和编译版本不一致问题####Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

  • 错误提示文字提示

Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

  • 错误提示如下图
依赖v7包和编译版本不一致问题####Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'._第1张图片

  • 解决方案:

找不到com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
这是API 23(Android 6.0)中的资源文件,而查看build.gradle,编译的SDK只是为21,我们可以尝试将compileSdkVersion设为23(如果sdk里面没有下载API 23的,则需要下载),问题解决!

  • 主要是编译的compileSdkVersion 要和依赖的v7匹配、上图是最好的解释
依赖v7包和编译版本不一致问题####Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'._第2张图片

依赖v7包和编译版本不一致问题####Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'._第3张图片

这就不匹配、需要将compileSdkVersion 改成25、或者v7包降级。换成和compileSdkVersion 对应的包。


  • 参考链接如下:
    参考的博客
    参考的stackoverflow

你可能感兴趣的:(依赖v7包和编译版本不一致问题####Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.)