android - Fabric 添加款式缺失

标签 android twitter-fabric

我试图在我的应用程序中添加集成 Fabric-Twiiter 登录。在向导过程中,Fabric 在我的项目中添加了一些内容。 从那时起我收到此错误:

Error:Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light'.

在文件v32\values.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/Users/android/workspace/jenkins/workspace/fabric-android-staging-release/sdk/kits/digits/src/main/res/values-v21/themes.xml -->
    <eat-comment/>
    <style name="Digits_default" parent="@android:style/Theme.Material.Light">
        <item name="dgts__accentColor">?android:attr/colorAccent</item>
    </style>
</resources>

我不知道它从哪里来,也不知道该怎么办,请帮忙。

最佳答案

这是一个 Material 设计主题,可以在 Android 的 API 21 中找到。您需要确保在 SDK 工具中安装了该 API 级别,然后在 build.gradle 文件中更改您的compileSdkVersion:

android {
  ...
  compileSdkVersion 21
  ...
}

您可能还需要调整 targetSdkVersion,但我认为我不必这样做。

关于android - Fabric 添加款式缺失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27785592/

相关文章:

android - 使图像文件在 Lollipop 的 Android Gallery 中可见

android - USB 未连接时 ScheduledExecutorService 停止

android - 在Android上使用XStream时如何注释order字段?

Android:在 recyclerview 中实现 mopub 原生广告会给出不正确的项目位置和 IndexOutOfBoundsException

android - 我如何初始化新版本的 crashlytics?

ios - 哪里可以下载twitterkit框架

android - Firestore 更新失败,出现 IllegalArgumentException : Invalid data. 不支持的类型

android - 使用 KSOAP 的 Web 服务

ios - 使用 Fabric SDK iOS 访问 Twitter 用户时间线

ios - Twitter Fabric.io 应用上传速度慢