1. Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
If you’re running into this issue, it’s because you’re missing this file: android/gradle/wrapper/gradle-wrapper.jar .
You can generate this binary by simply running
in the project’s android folder. If you don’t have gradle installed, follow gradle documentation on how to install it (or just run “brew install gradle” on MacOS).
2. SDK Location not found
If you’re running into this issue when building a React Native mobile app on Android, it’s because your Android SDK path is broken or it doesn’t exist. Open your ~/.bash_profile, and add the following lines at the beginning:
export ANDROID_HOME=~/Library/Android/sdk/ export PATH=~/Library/Android/sdk/tools:$PATH export PATH=~/Library/Android/sdk/platform-tools:$PATH
Now load the new ~/.bash_profile in your Terminal (restart the Terminal or run “source ~/.bash_profile“), and re-run the Android app.
3. Keystore file ‘…android/app/debug.keystore’ not found for signing config ‘debug’.
You can fix this error by simply running the following command in your android/app folder and typing in all the requested information:
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
4. warn Failed to connect to development server using “adb reverse”: spawnSync adb ENOENT
This is just an warning, and it means the build was successful, but it couldn’t open the app. Check out the app on your emulator / android device, and simply open it manually.