android - 呈现错误 : Failed to find style 'coordinatorLayoutStyle' in current theme

标签 android

我使用的是最新版本的 Android Studio。它说我的应用程序出现错误(渲染问题)。我试着把

<style name="AppTheme.NoActionBar">
  <item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item>
</style>

在 styles.xml 中,但仍然不起作用。有人可以给我一个解决方案吗?昨天刚下载开始研究Android Studio,所以还是什么都不懂。请帮助我...

最佳答案

我遇到了同样的问题,我是这样解决的:

转到:build.grandle(模块:app)

并更改代码如下:

    android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.yourname.yourappname"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
   // implementation 'com.android.support:support-v4:28.0.0-alpha3'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

对不起我的英语

关于android - 呈现错误 : Failed to find style 'coordinatorLayoutStyle' in current theme,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50103115/

相关文章:

android - 小部件上的自定义快速操作

Android 不同的屏幕尺寸

java - 为什么 HttpUrlConnection 在移动数据连接上抛出 SSLException?

java - Android 对话框错误指定的 child 已经有一个 parent 。您必须先在 child 的 parent 上调用 removeView()

android - 应用程序崩溃并出现错误 java.lang.IllegalArgumentException : Layout: -72 < 0

Android 计算机视觉 JavaCV OpenCV FastCV 比较

android - 从 ImageView 中获取可绘制对象

安卓 : how to reload custom markers once the image is downloaded via Picasso?

android - 快速改变位图的颜色

java - 调频 radio : can we implement FM Radio and create and application of it?