解决ThemeOverlay.AppCompat.Light找不到而导致的编译失败问题

在引入某些第三方库时,有时会遇到这样的编译错误:
error: resource style/ThemeOverlay.AppCompat.Light (aka com.zxm.getappclassname:style/ThemeOverlay.AppCompat.Light) not found.
究其原因是在引入的库中使用了v7兼容的theme类型,比如:ThemeOverlay.AppCompat.Light、Theme.AppCompat.Light等。
所以解决方案就是引入v7兼容包:
implementation 'com.android.support:appcompat-v7:27.1.1'
 

猜你喜欢

转载自blog.csdn.net/chenzhengfeng/article/details/108358770