2014-10-31 28 views
4

之前这个错误我的所有应用程序都很好,但是当我采取新项目突然它显示错误在我的appcompat和我的项目在构建路径在android依赖项它是显示error.Pleas给我一些解决方案,我应该怎么做。 也给了我更清晰的android依赖和appcompat库文件。 其显示的错误: - 你还没有加入appcompat_v7库当我正在采取新的android项目appcompt显示错误

appcompat_v7/res/values-v21/themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'. 
appcompat_v7/res/values-v21/themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'. 
appcompat_v7/res/values-v21/themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. 
appcompat_v7/res/values-v21/themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. 
appcompat_v7/res/values-v21/themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. 

感谢

+0

您应该检查[本StackO-邮报](HTTP://计算器。com/questions/26431676/appcompat-v721-0-0-no-resource-found-that-matches-the-name-attr-andro/26449172#26449172) – reVerse 2014-10-31 14:39:42

回答

2

终于我的错误solveed但是这不是我想要的精确解。我做了什么,我创建了一个新项目,并采取了最低SDK版本是15 BCOZ动作栏功能是目前在15和更进一步的API。我认为功能介绍在11 api.so我采取了新的项目与最低SDK版本,然后没有需要appcompat库现在没有错误... 但我解决了这个问题的替代解决方案,但我也想回答我的问题。

1

正确

检查你是否有在右侧的库单击项目 - >属性 - >选择的android - > appcompact lib(这个库应该被认为你错过了这个) 所以请按照以下步骤操作: -

1)右键单击你的项目并选择属性。

2)在对话框左侧的类别面板中,选择Android。

3)在“库”窗格中,单击“添加”按钮。

4)选择库项目并单击确定。例如,appcompat项目应该被列为android-support-v7-appcompat。

5)在属性窗口中,单击确定。

如果您在单击添加按钮时没有看到任何内容(步骤3),那么您应该参考此链接: - https://developer.android.com/tools/support-library/setup.html,在该链接中阅读添加资源库并遵循以下步骤。

OR

Make sure you have downloaded the Android Support Library using the SDK Manager. 
Create a library project and ensure the required JAR files are included in the project's build path: 
    1) Select File > Import. 

    2)Select Existing Android Code Into Workspace and click Next. 
    Browse to the SDK installation directory and then to the Support Library folder. 
    For example, if you are adding the appcompat project, 
    browse to <sdk>/extras/android/support/v7/appcompat/. 

    3)Click Finish to import the project. For the v7 appcompat project, 
    you should now see a new project titled android-support-v7-appcompat. 

    4) In the new library project, expand the libs/ folder, 
    right-click each .jar file and select Build Path > Add to Build Path. 
    For example, when creating the the v7 appcompat project, 
    add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path. 
    5) Right-click the library project folder and select Build Path > Configure Build Path. 

    6) In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files. 
    Uncheck Android Dependencies. 
    7) Click OK to complete the changes. 
+0

我已经检查过。我已经添加了appcompat库,并且在android对话框中,appcompat库显示并且right singn也在那里。 – 2014-11-02 15:17:56

+0

错误是appcompat库它显示交叉标记我认为第一次图书馆应该是正确的....... PLZ给一些解决方案 – 2014-11-03 05:06:35

0

是的,这件事情也因为太多日子而来。 转到您的项目属性 ,并选择所有的东西与你在sdk下载的例如在我的情况下API api 17我选择和sdk我已经安装了一切。 Your project properties

我也做了一件额外的(图像)底部,你可以看到复选框(是库)我删除了参考appcompat_v7,然后单击应用。

跟我一样的魅力这个everyting工作后..... 最后我得出这样

相关问题