I have a React Native application, that runs fine on iOS, I tried to run it on Android too, but I always get the error:
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
D8: Cannot fit requested classes in a single dex file (# methods: 116691 > 65536 ; # fields: 80012 > 65536)
I tried every solution I saw, nothing worked.
I ran the react-native-community cli doctor and it seems like React Native won't recognize the Android SDK.
I checked, and the emulator sdk and the gradle sdk versions are the same.
echoing ANDROID_HOME on the terminal properly gives me the sdk path, I followed the React Native getting started again to see if I missed something, but it seems like everything is install correctly.
I can't figure out why this won't run.