Android development - 'missing theme error' in eclipse ide for layout xml files

前端 未结 10 560
遥遥无期
遥遥无期 2020-12-10 05:22

I have recently installed Eclipse IDE for Java Developers (Version: 3.6.1) with the Android SDK Platform 2.1update1 - on Windows 7.

I can add, edit and run code for

相关标签:
10条回答
  • 2020-12-10 06:05

    I've had this problem too.

    I had a project that was using the Google APIs (Level 7) as the build target. I'm guessing there's something awry in this build that doesnt point nicely to the appropriate theme files. To get around this, I switched my "Project Build Target" to Android 2.1-update1 and it seems to be ok.

    To get there.. Within your project open, click Project (from the top menu) -> Properties -> select Android and change the build target.

    I may find myself needing the GoogleAPIs at some point, so may need to change back. This may solve the problem, who knows.

    0 讨论(0)
  • 2020-12-10 06:06

    Make sure your all other styles.xml present under different values contains your custom theme part.

    I had similar problem. In my case I had added a custom theme in values-large folder under res. And it was working at runtime but giving error as yours in eclipse.

    So i tried a different solution i.e. adding the custom part(in my case totally there was 3 tags added to styles.xml file) in all other styles.xml file. i.e. styles.xml files under values-normal-hdpi, values-normal-mdpi, valuse-v11 and values-v14...

    And BOOM!!! It solved my problem which wasted my whole day.

    0 讨论(0)
  • 2020-12-10 06:13

    I had this problem with a few brand new projects, with no code added yet. Eclipse apparently defaults to using the highest android sdk installed for the layout editor, even if you specify a different version during creation for the minsdk. Project...Clean... rebuilt it and then it was fine.

    0 讨论(0)
  • 2020-12-10 06:13

    I had this same problem.. I am using Android 3.0 and developing for the Xoom, and it was already selected. However, changing the version to 2.3.3, and then back to 3.0 also solved the problem.. No rebuilds, re-import of the project, just changed the version, and changed it back again to it's original value. But that may be specific to 3.0. Once solved I didn't go any further into it..

    0 讨论(0)
  • 2020-12-10 06:14

    You just select theme on top. above You can see your xml design on my image:

    XML design

    0 讨论(0)
  • 2020-12-10 06:15

    In the "Graphical Layout" tab of the layout editor there is a dropdown for selecting the Android version to use. In your case it is probably blank, so select a version and you're probably good to go.

    0 讨论(0)
提交回复
热议问题