xuexiangjys / XUI

💍A simple and elegant Android native UI framework, free your hands! (一个简洁而优雅的Android原生UI框架,解放你的双手!)
https://xuexiangjys.github.io/XUI/
Apache License 2.0
4.85k stars 835 forks source link

新建的项目引入主题报错。 #175

Closed xufeng1026 closed 6 months ago

xufeng1026 commented 9 months ago

你好,新建的项目按照引用的教程操作,但在引入主题后,项目启动闪退,是什么原因呀? 引入方式如下: 1.增加: maven { url "https://jitpack.io" } 2.增加: //androidx项目 implementation 'com.github.xuexiangjys:XUI:1.2.1'

implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'com.google.android.material:material:1.4.0' implementation 'com.github.bumptech.glide:glide:4.12.0' 3.引入主题

4.然后编译都成功,但启动app闪退,把主题换成原因的就正常 5.新建项目图片如下 image

xufeng1026 commented 9 months ago

后台报这样的错误: image

xuexiangjys commented 6 months ago

你代码的问题, AppTheme默认基类的主题是Theme.AppCompat.Light.NoActionBar,默认是没有ActionBar的,你无法使用setSupportActionBar()