Skip to content Skip to sidebar Skip to footer

Why Build And Libs Folders In Android Project Can't Be Commited Or Pushed?

I'm using Android Studio in combination with GitHub repository. So I have just pushed my entire project but I mentioned that I can push only my src folder. Is there any reason that

Solution 1:

By default Android Studio puts the build directory (both at the project level and the module level) in the .gitignore.

This is typically the desired behavior, as there is no reason to keep most of the generated files in version control. Gradle will create these again for you on any machine you download the project to.

If you want to include the build directories, simple remove /build from both the .gitignore in your project's root and the .gitignore in your module's root.

The libs directory should not be in there by default, but if you are adding files to that directory and Git isn't recognizing the change, that's where I would look.

Post a Comment for "Why Build And Libs Folders In Android Project Can't Be Commited Or Pushed?"