How to solve too many errors that come when you update your android project libraries at once ?
I have a very old android project that was build in java, then partially convert to kotlin . Every huge google update bring several warning and bug with it.
Today, i found these error when trying to update this project library :
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt...
and
Can't determine type for tag '<macro name="m3_comp_bottom_app_bar_container_color">?attr/colorSurface</macro>'
and ( again )
The minCompileSdk (33) specified in a dependency's
well, there are many instance of each errors no matter where i change some library version.
When it come with this, by experience, my friend … It’s time to upgrade your android studio or stay with the old librairies ( forever ).
Forget tips you find on internet about each of these errors. If you dont have the latest version of android studio, please start to upgrade these before trying to solve anything.
Remember, you have two solutions, not without consequences.
How to solve android project errors that come when you update libraries
There two solutions for this, upgrade your android studio or stay with your working libraries version. None of these solutions are without consequences.
1- upgrade android studio
Upgrade my android IDE did’nt solve all errors at once.
But at least, it helps me solve this :
Can't determine type for tag '<macro name="m3_comp_bottom_app_bar_container_color">?attr/colorSurface</macro>'
This error came because of the android material design library. When you update it, some errors about missing some UI tag appear.
The error about The minCompileSdk (33) specified in a dependency’s looks straightforward to solve. It is when you upgrade your android studio.
If you didn’t, you will have hard time solving errors that come after changing the minCompileSdk !!
2- Do not update any library
This is not a recommanded option but you can do this if you dont feel ready to make the big move of upgrading android studio and all your project libraries.
You should not wait very long to do it because, sometime, google can force you to do it if your libraries are too old.
They once did it to me and… it wasn’t good at all!