我使用的是最新版本的 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/