<android.support.v7.widget.Toolbar
爆红
可能是
gradle.properties 里面用了
android.useAndroidX=true
可以把他注释掉试试
但是如果项目本来就是用的Androidx,想要强行加入v7的库好像有点问题啊
比如这样报错了
Manifest merger failed : Attribute application@appComponentFactory
value=(androidx.core.app.CoreComponentFactory) from
[androidx.core:core:1.3.1] AndroidManifest.xml:24:18-86 is also
present at [com.android.support:support-compat:28.0.0]
AndroidManifest.xml:22:18-91
value=(android.support.v4.app.CoreComponentFactory). Suggestion: add
‘tools:replace=“android:appComponentFactory”’ to element
at AndroidManifest.xml:5:5-41:19 to override.
所以可能就不能把Androidx和 v7 的代码写在一起吧,只能把v7的代码翻译一下了