想要达到竖直导航栏的效果,但是tablayout并没有这个属性,网上都是使用VerticalTabLayout 的开源库,然而我使用compile 'q.rorbin:VerticalTabLayout:1.2.5' /api 'q.rorbin:VerticalTabLayout:1.2.5'或者implement 'q.rorbin:VerticalTabLayout:1.2.5' 一开始都安装不上,后面没有管它之后,然后不知道什么时候安装上了,但是在布局文件中却无法解析q.rorbin.verticaltablayout.VerticalTabLayout
后来在安装其他的库的时候有一个报错
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
和一个警告
Your project has set `android.useAndroidX=true`, but configuration `:app:debugRuntimeClasspath` still contains legacy support libraries, which may cause runtime issues.
This behavior will not be allowed in Android Gradle plugin 8.0.
Please use only AndroidX dependencies or set `android.enableJetifier=true` in the `gradle.properties` file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).
The following legacy support libraries are detected:
警告提示android阻止了版本比较旧的库(难怪之前安装别的库也有问题),解决办法:
只需要在gradle.properties文件中加入一行配置即可:
android.enableJetifier=true