欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

[android] No resource found that matches the given name 'Theme.AppCompat.Light'

发布时间:2024/5/28 编程问答 51 豆豆
生活随笔 收集整理的这篇文章主要介绍了 [android] No resource found that matches the given name 'Theme.AppCompat.Light' 小编觉得挺不错的,现在分享给大家,帮大家做个参考.
    在整合android过程中导入别人的项目出现下面的错误:
        <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
        error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
    通过stackoverflow查到其解决方法,如下:
    1.File->Import (android-sdk\extras\android\support\v7). Choose "appcompat"
    在"文件"中导入sdk路径extras\android\support\v7中的appcompat文件夹.如下图所示:



   2.Project-> properties->Android.  In  the  section library "Add" and choose "appCompat" 


    此时问题即可解决,能正确运行.
    问什么会出现这个问题呢?这是我整合“随时拍”项目其他人的代码,他的版本比我的低,新的eclipse默认模版主题UI需要使用比较高版本api,如果需要支持低版本,需要导入appCompact库来支持.希望文章能解决大家的bug.
  (By:Eastmount 2014-12-3 晚上10点 http://blog.csdn.net/eastmount/)

    参考资料:
    stackoverflow答案
    http://blog.csdn.net/huiguixian/article/details/41210895
 

总结

以上是生活随笔为你收集整理的[android] No resource found that matches the given name 'Theme.AppCompat.Light'的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。