You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Eclipse开发Android时新建项目出现No resource错误求助

Fixing the "No resource found that matches the given name" Error in Eclipse Android Project

Hey there! I see you're working through Android Application Programming by James Talbot and Justin McLean, and ran into a snag when creating your project. Let's fix that styles.xml error together.

First, let's recap the error you're seeing:

[2018-04-16 23:53:15 - OnYourBike-Chapter3] C:\Users\benjo\workspace\learningandroid\OnYourBike-Chapter3\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'T...

This error almost always boils down to a mismatch between your project's target SDK, installed SDK components, or a typo in your theme reference. Here's how to fix it step by step:

  • Check if you have the API 14 SDK Platform installed
    Open the Android SDK Manager in Eclipse (Window → Android SDK Manager). Look for "Android 4.0 (API 14)" and make sure the "SDK Platform" checkbox is checked and fully installed. The values-v14 folder is for devices running API 14+, so you need the corresponding SDK resources to exist on your machine to reference its themes.

  • Verify your project's Target SDK version
    Right-click your project → Properties → Android. Under "Project Build Target", select API 14 or a higher version. If you have a lower target set, Eclipse can't locate the v14-specific theme resources your styles.xml is trying to use.

  • Double-check your theme name in styles.xml
    The error cuts off at 'T...', but it's likely you're referencing a theme like @android:style/Theme.Holo.Light or similar. Open the values-v14/styles.xml file, jump to line 8, and make sure the parent theme name is spelled perfectly (no missing characters, typos, or incorrect prefixes). A valid example would look like:

    <style name="AppBaseTheme" parent="@android:style/Theme.Holo.Light">
    
  • Clean and rebuild your project
    Sometimes Eclipse's build cache gets corrupted. Go to Project → Clean, select your OnYourBike-Chapter3 project, and let Eclipse rebuild it from scratch. This often clears up weird resource reference glitches.

Give these steps a shot—one of them should get your project up and running so you can get back to diving into Android development!

内容的提问来源于stack exchange,提问作者Benjamin Bajic

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 04:17:07