本人小白一个,最近在看动态加载,打算把别人的应用放入自己的项目中,但是在运行项目·时报了这么一个错误:
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/AlertDialog'
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/DialogWindowTitle'.
查看代码,是这values-v23下的这两行导致的编译不通过:
<style name="Base.TextAppearance.AppCompat.Widget.Button.Inverse" parent="@android:style/AlertDialog" />
<style name="Base.Widget.AppCompat.Button.Colored" parent="@android:style/DialogWindowTitle" />
如果说我们无法直接继承系统主题里的AlertDialog的style的话,那么为什么他们可以用呢?困扰已久,请大牛指点一二!!
一般是版本库的问题,看下这篇内容http://blog.sina.com.cn/s/blog_3e28c8a50101g14g.html
这跟导入的库有什么关系吗?
1.删除\android\sdk\extras\android\m2repository\com\android\support\appcompat-v7下的23.0.0、23.0.1两个文件夹
以及maven-metadata.xml文件中的23.0.0
23.0.1两行。
2.重启Android Studio。