我尝试使用安卓暗黑主题。我安装了 Android Studio 3.5 预览版。
compileSdkVersion 28 targetSdkVersion 28
但是仍然遇到这个错误。是暗黑主题的 bug 还是我做错了什么?
build.gradle{
dependencies {
// ...
implementation 'com.google.android.material:material:1.1.0-alpha06'
// ...
}}
样式.xml
<style name="Theme.MyApp" parent="Theme.MaterialComponents.DayNight">
<item name="android:forceDarkAllowed">true</item>
</style>
项目链接