没有资源的发现,给定的名称匹配'Theme.AppCompat.Light.DarkActionBar“
我已经加入 Android的支持-V7-应用程序兼容性
和 appcompat_v7
来的项目资源管理器。而且还增加了 Android的支持-V7-appcompat.jar
来构建路径。
I have added android-support-v7-appcompat
and appcompat_v7
to the project explorer. And also added the android-support-v7-appcompat.jar
to the build path.
但同样我得到这个
No resource found - Theme.AppCompat.Light.DarkActionBar!
如何解决这一问题?
有关我的方案包括重新Android的V7应用程序兼容性(程序兼容性)支持库:
For me the solution involved recreating Android's v7 application compatibility (appcompat) support library:
- 根据的 Android的支持-V7-应用程序兼容性库https://developer.android.com/tools/support-library /setup.html\">instructions 的Android开发支持库设置页上。 注:的 我不得不手动更改的
project.properties
的文件拿到新库进行编译。更改的目标=机器人-19
的到的目标= Android的21
。 - 明确这个新的
Android的支持-V7-应用程序兼容性
库添加到您问题的项目: - 之后的完成项目的属性应该是这个样子:
- Create the new
android-support-v7-appcompat
library according to the instructions on the Android developer Support Library Setup page. Note: I had to manually change theproject.properties
file to get the new library to compile. Changetarget=android-19
totarget=android-21
. - Explicitly add this new
android-support-v7-appcompat
library to your troubled project: - After that's done the project's properties should look something like this:
现在,该项目应编译。这是一个很长的路要走,但它为我工作。
Now, the project should compile. It's a long way to go, but it worked for me.
所有这些工作的一个有趣的副作用是,当我建立了我的下一个项目时,Eclipse会自动创建一个新的 appcompat_v7
库项目,把它添加到我的工作区,突然间一切都恢复正常。我大概做了不同的东西,但我一直没能弄明白什么还没有。无论如何,我终于得到了我的项目编译并在这个过程中,似乎我在Eclipse ADT重的东西。
An interesting side effect of all of this work is that when I created my next project, Eclipse automatically created a new appcompat_v7
library project, added it to my workspace, and suddenly everything was back to normal. I probably did something different, but I just haven't been able to figure it out what yet. Anyway, I finally got my project to compile and in the process it appears that I reset something in the Eclipse ADT.
我希望这有助于。