error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.,appcompatv7

error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

这个错误表明缺少Theme.AppCompat.Light这个主题,而这个主题在appcompat-v7里面,所以要解决这个问题,先下载一个appcompat-v7库,再import。

error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.,appcompatv7

 import以后,再把该库添加到出错的工程中。步骤:

(1)右键单击项目,选择Properties,在左边的窗体中选择Android;

(2)点击Library列表旁边的Add按钮,在弹出的窗体中双击appcompat-v7;

error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.,appcompatv7

error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.,appcompatv7

(3)点击OK,已将appcompat-v7添加到工程,就不会再有这个错误了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-01
  • 2022-12-23
  • 2021-10-19
  • 2021-06-29
  • 2021-09-10
  • 2022-12-23
猜你喜欢
  • 2021-06-28
  • 2022-03-08
  • 2021-05-13
  • 2021-06-06
  • 2022-12-23
  • 2021-09-26
  • 2021-06-14
相关资源
相似解决方案