Check out example codes for "Compilation is not supported for following modules: android. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project". It will help you in understanding the concepts better.

Code Example 1

save .idea folder somewhere else (for backup)
remove .idea folder
start AndroidStudio
select project
[there may be an error, ignore that]
click File -> Invalidate Caches/ Restart
click button: Invalidate Caches/ Restart

Learn ReactJs, React Native from