Android development for gesDeportiva uses the standard React Native CLI workflow. You compile and bundle the JavaScript layer alongside the native Android project managed by Gradle, then deploy to an emulator or a connected device over ADB.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/martiigarcia/gesdeportiva/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before running the app you need the following tools installed and configured:- Android Studio — includes the Android SDK, AVD Manager, and the emulator
- Android SDK — API level 31 (Android 12) is the compile and target SDK; API level 21 (Android 5.0) is the minimum supported SDK
- JDK 11 — required by the Gradle build system
- Node.js and npm — to run the React Native CLI and Metro bundler
ANDROID_HOME (or ANDROID_SDK_ROOT) is set in your shell profile and that $ANDROID_HOME/platform-tools is on your PATH.
Build configuration
The SDK versions and NDK version are defined inandroid/build.gradle:
android/build.gradle
android/app/build.gradle
Running the app
Start the Metro bundler
In a dedicated terminal, start the JavaScript bundler. Metro watches your source files and serves the bundle to the app at runtime.
npm run android will automatically start Metro if it is not already running.
Emulator vs physical device
- Emulator
- Physical device
Open the AVD Manager in Android Studio and start a virtual device. Ensure it targets API 21 or higher. Verify it is visible to ADB before running the build:You should see an entry like
emulator-5554 device.New Architecture (Fabric and TurboModules)
gesDeportiva ships with the New Architecture disabled by default. The opt-in is controlled by a Gradle property that is injected into the app as aBuildConfig field.
MainActivity.java reads that flag to activate the Fabric renderer and Concurrent Root:
android/app/src/main/java/com/gesdeportiva/MainActivity.java
MainApplication.java applies the same flag to TurboModules:
android/app/src/main/java/com/gesdeportiva/MainApplication.java
android/gradle.properties, which ships with it set to false:
android/gradle.properties
newArchEnabled=false to newArchEnabled=true in android/gradle.properties, then do a clean build:
Common issues
Metro port conflict
Metro port conflict
Metro defaults to port 8081. If something else is already using that port, start Metro on a different port:Then tell the Android build to use the same port by shaking the device to open the developer menu and updating the bundle URL, or by setting
metro.config.js.Emulator not found
Emulator not found
If
npm run android reports that no emulator is running, open Android Studio’s AVD Manager, start a virtual device, and wait until it is fully booted before re-running the command. Confirm with adb devices.SDK path not set
SDK path not set
Gradle needs to locate the Android SDK. Create or update On Linux this is typically
android/local.properties with the correct path:android/local.properties
~/Android/Sdk.Build fails after changing IS_NEW_ARCHITECTURE_ENABLED
Build fails after changing IS_NEW_ARCHITECTURE_ENABLED
Switching the New Architecture flag requires a clean build. Run the following before rebuilding: