Question
BuildConfig.VERSION_NAME not updating in code after modifying build.gradle and syncing project
I'm experiencing an issue with BuildConfig.VERSION_NAME
in my code. When I change the version name in the build.gradle file and sync the project, the change isn't reflected in my code. Instead, the code continues to display the previous version name until I either rebuild the entire project or make some change to the project code.
I've checked the generated BuildConfig
class, and it shows the new version name correctly. However, when I log the BuildConfig.VERSION_NAME
value, it still shows the old one.
Does anyone know why this is happening or how to fix it?
Also, I have recently updated the targetSdk to 34, gradle version to 8.4 and kotlin version to 2.0