Android studio 3.2
I have migrated my project to android studio 3.2. After migration I see generatedJava folder in my Android folder structure. I don't have any use of it.
How can I remove this generatedJava folder from Android Studio?
Why you want to remove this?
Here is some explanation behind the reason to keep it as it is.
No one forces you to look into this folder. But if your project has a lot of generated code (room, data binding, dagger) then it is very handy to have quick access to these files in order to check if they were generated properly, set some breakpoints for debugging etc...
I really do not see anything bad about this folder being visible. In addition if its in the "generated" folder, then everyone could understand the contents are dynamic.
In addition it is good even for beginners to see that their code causes some generated code also. They will understand faster that it is not black magic happening behind room, dagger, data binding etc by seeing what is the actual code generated for a short annotation.
You can't actually remove it since it has been in your project also before:
build/generated/source/r/<current flavor>/<current build type>/
- Refer to this answer.
But now, it reappear in the Android view mode of the project so that we can use for our purposes. There has been many topics like this before and unfortunately I couldn't find anything related to remove or hiding this in the Android Studio.
You also, if you remove it, it will reappear again since it is auto-generated by Android Studio so, perhaps this is gonna be a feature request for the next releases of Android Studio IDE itself.
Also, as mentioned, it can be helpful but, since it is added in the Android view mode, looks weird and unfamiliar. But there is no harm of seeing it in there.
Sorry to disappoint you
Right click on generated, then Hide ignored files.
来源:https://stackoverflow.com/questions/52400081/how-to-remove-generatedjava-from-android-studio-3-2