In my React Native apps, I've had bugs where the solution was to either upgrade Gradle or the Android Gradle Plugin. Is there a best practice on when to upgrade them? For example, should you keep an eye out for new versions of both of them and always keep them up-to-date? Or only when you upgrade react-native versions? Or something else?
-
Generally I would recommend only upgrading dependencies like this as needed (i.e. when an Android API version requires it). You may break compatibility with third-party libraries, and there aren't likely to be major benefits from using the absolute latest versionKai– Kai2021年04月23日 20:46:56 +00:00Commented Apr 23, 2021 at 20:46
-
Hi Kai, what's an "Android API version"?RNdev– RNdev2021年04月23日 20:50:22 +00:00Commented Apr 23, 2021 at 20:50
1 Answer 1
Personally, I haven't had to upgrade Gradle often, but it's a good thing to try if you're app isn't building. Gradle is a build tool, if building isn't working, Gradle being out of date might be part of the problem.
I basically see two ideologies. 1. Always update, 2. Update when you have to. Always keeping your dependencies up to date can help with troubleshooting and keeping with best practices, but can also open you up to bugs and can take a lot of extra work. Updating when you have to is good for mission critical apps that require stability over new features. It also cuts down on development work.
Gradle also adds a potential breaking changes section to their update documentation.
Comments
Explore related questions
See similar questions with these tags.