为了账号安全,请及时绑定邮箱和手机立即绑定

【新手】新建项目报错,求解决方法

为什么自己新建的工程会报错?不管选择的sdk是4.4还是5.0,求解决方法

5498f32d00011a4102310301.jpg

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:223: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:81: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:83: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:84: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:82: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:79: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:80: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:118: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:120: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:121: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:119: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:116: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:117: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:155: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:157: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:158: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:156: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:153: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:154: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:192: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.

[2014-12-23 12:41:27 - IMoocMusic] E:\Java\workspace\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.


正在回答

7 回答

。。我的也是 解决不了 不是API的问题



0 回复 有任何疑惑可以回复我~

把你的project build target 从4.4.2 改成 5.0或以上

0 回复 有任何疑惑可以回复我~

这是jdk的问题吗

0 回复 有任何疑惑可以回复我~

已经搞定,是21的API需要1.7版本的jdk,我环境下是1.6的导致出错,谢谢各位

0 回复 有任何疑惑可以回复我~
#1

Boy_iOS

我有同样的错误我的环境是1.8的
2015-10-21 回复 有任何疑惑可以回复我~
#2

lpsky123

具体怎么设置,我导入一个原来的项目没问题,结果新建了一个项目就都出问题了...
2016-04-24 回复 有任何疑惑可以回复我~

你的apptheme有问题

0 回复 有任何疑惑可以回复我~

新建的工程选择更高的api还是同样报错呢,选择不同的api同时还clean了

5499084a0001fae705000251.jpg

0 回复 有任何疑惑可以回复我~

在v7项目上右键 >>> Properties >>> Android 在右侧的Project Build Target 面板中选择更高的api

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Android猜歌游戏是这样炼成的
  • 参与学习       27735    人
  • 解答问题       422    个

手把手教你完成一款猜歌类游戏,向你展示游戏实现的全部细节

进入课程

【新手】新建项目报错,求解决方法

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信