Big*_*tos 5 android android-appcompat gradle
我通过以下方式导入了appcompat库:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:support-v4:+'
}
Run Code Online (Sandbox Code Playgroud)
在我的{ProjectName}/{ModuleName} /build.gradle中.该库显示在外部库中.然而,我无法构建应用程序,因为当我尝试时,我的styles.xml中出现错误:
Error:Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'
Run Code Online (Sandbox Code Playgroud)
这是我声明一个主题从AppCompat主题派生的地方,如下所示:
<style name="TextStyleSuperClass" parent="@style/Theme.AppCompat.Light">
</style>
Run Code Online (Sandbox Code Playgroud)
你知道怎么解决这个问题吗?
在这个网站“ Getting ActionBar support libraryworking with Android Studio ”上,我找到了以下行并将其添加到以下活动中AndroidManifest.xml:
android:theme="@style/Theme.AppCompat.Light"
Run Code Online (Sandbox Code Playgroud)
由此 Android Studio 能够解决Theme.AppCompat
| 归档时间: |
|
| 查看次数: |
1670 次 |
| 最近记录: |