Android的Studio支持库V7 [英] Android Studio Support Library v7

查看:178
本文介绍了Android的Studio支持库V7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用支持操作栏。我按照有关如何将在Android的工作室v 0.3.0支持库的所有指令。我build.gradle的依赖性看起来像

I am attempting to use the Support Action Bar. I have followed all the instructions on how to include the support library in Android Studio v 0.3.0. My build.gradle's dependencies looks like

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':NineOld')
    compile project(':Helpshift')
    compile project(':SlidingMenu:library')
    compile project(':AmbilWarna')
    compile 'com.android.support:support-v4:18.0.+'
    compile 'com.android.support:appcompat-v7:18.0.+'

}

当我尝试使用的主题

android:theme="@android:style/Theme.AppCompat"

Android的工作室表示,它无法解析的符号,我知道这曾经是一个问题,但我相信它是固定在0.2.6。

Android Studio says it cannot resolve the symbol, I know this used to be an issue but I believe it was fixed in 0.2.6.

在建设项目中,我得到

Gradle: No resource found that matches the given name (at 'theme' with value     '@android:style/Theme.AppCompat').

在我干净的依赖关系的项目,我应该看到坛子里的外部库是否正确?目前,我只看到了支撑v4-18.0.0罐子。

After I clean the project with the dependencies I should see the jars in the External Libraries correct? At the moment i only see the support-v4-18.0.0 jar.

感谢您的帮助

推荐答案

删除机器人:preFIX。

Remove the "android:" prefix.

样式和主题不包含在您的最低API级别不会在那里。 所以,如果你的最低API级别为8(升级Froyo),那么任何时候你preFIX与资源机器人:这是要看看在Android的资源文件夹平台-8(Android的SDK \平台\ Android为8 \ DATA \ RES)。

Styles and Themes not included in your minimum API level will not be there. So if you're minimum API level is 8 (Froyo), then any time you prefix a resource with "android:" it's going to look in the android "res" folder for platform-8 (android-sdk\platforms\android-8\data\res).

最后,为什么你需要使用AppCompat库主要的原因是因为Theme.Holo并不在你的平台上资源文件夹中存在,除非你提高你的最低API级别为11(蜂窝)。

Lastly, the main reason why you need to use the AppCompat library is because the "Theme.Holo" does not exist in your platform "res" folder unless you raise your minimum API level to 11 (Honeycomb).

这篇关于Android的Studio支持库V7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆