I have a react native running perfectly on iOS but does not compile in Android studio due to import issues in MainApplication and MainActivity. I followed the React Native F
It happened to me too after detach my react-native project from Expo.
In MainApplication I had "error Cannot resolve symbol" for these imports:
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
in my package.json file I used:
"react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
the problem was that the android can't find the directory for node_modules like that.
in order to fix the issue I had to:
change it to :
"react-native": "^0.57.8",
delete node_modules file
That's what solved the problem for me. Hope I helped.
I solved it by upgrading react-native, react-native-cli, gradle plugin to last version