使用ARouter 跨module 出现You need to use a Theme.AppCompat theme (or descendant) with this activity

使用ARouter 跨module 出现You need to use a Theme.AppCompat theme (or descendant) with this activity

问题描述:

在使用ARouter的时候 新建了一个module 运行之后 在SplashActivity之后进入主Activity 但是MainActivity 是继承BaseActivity的,突然app就crash了,报了这个出错。

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity

解决方法:

困扰了很久 ,因为发现配置主题并没有什么错。遂检查了下新建的Module 的结构,发现在新Module 中 values 中的style 和color 文件还在,里面还有 app.style 的声明。
应该是编译器找错了,删除这俩文件就好了。
这个坑找了好久,记录一下!!!

猜你喜欢

转载自blog.csdn.net/qq_31017737/article/details/81030507