[英]Asking for help: “error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light' ”
I'm a freshman in Android. 我是Android的新生。 When I create an Android application project in Eclipse, three errors occurred.As follow: Details of three errors 当我在Eclipse中创建一个Android应用程序项目时,发生了三个错误。如下所示: 三个错误的详细信息
This is the code in styles.xml: 这是styles.xml中的代码:
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
To solve this, I have searched a lot of times on the Internet. 为了解决这个问题,我在互联网上搜索了很多次。 I did find some solutions on the Internet, but that didn't work. 我确实在Internet上找到了一些解决方案,但这没有用。 I would be really grateful if anybody could help me out~ 如果有人能帮助我,我将非常感谢〜
check your app theme in values-->style folder also in values-v11,values-v14. 在values-v11,values-v14中的values-> style文件夹中检查您的应用主题。
check what your activity extend "AppcompactActivity" or "Activity". 检查您的活动扩展了“ AppcompactActivity”或“ Activity”。 if you have to use "Activity" for extend of your activity, then go to style.xml and change parent "theme" like "android:Theme.Light". 如果您必须使用“活动”来扩展活动,请转到style.xml并更改父级“主题”,例如“ android:Theme.Light”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.