新建的项目引入主题报错。
xufeng1026 opened this issue · comments
你好,新建的项目按照引用的教程操作,但在引入主题后,项目启动闪退,是什么原因呀? 引入方式如下:
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.引入主题
你代码的问题, AppTheme默认基类的主题是Theme.AppCompat.Light.NoActionBar,默认是没有ActionBar的,你无法使用setSupportActionBar()