title: Failed to launch emulator on Android Studio
body: <p>I am currently building a react-native app and I get this error message everytime I run: <strong>react-native run-android</strong></p>
  <p>Error Message:</p>
  <pre><code>info Running jetifier to migrate libraries to AndroidX. You can disable it using &quot;--no-jetifier&quot; flag.
  Jetifier found 1052 file(s) to forward-jetify. Using 8 workers...
  info Starting JS server...
  info Launching emulator...
  error Failed to launch emulator. Reason: Emulator exited before boot..
  warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
  info Installing the app...
  
  &gt; Configure project :react-native-firebase_app
  :react-native-firebase_app package.json found at /Users/asakoulas/BODYBOX/Bodybox/node_modules/@react-native-firebase/app/package.json
  :react-native-firebase_app:firebase.bom using default value: 28.1.0
  :react-native-firebase_app:play.play-services-auth using default value: 19.0.0
  :react-native-firebase_app package.json found at /Users/asakoulas/BODYBOX/Bodybox/node_modules/@react-native-firebase/app/package.json
  :react-native-firebase_app:version set from package.json: 12.1.0 (12,1,0 - 12001000)
  :react-native-firebase_app:android.compileSdk using custom value: 29
  :react-native-firebase_app:android.targetSdk using custom value: 29
  :react-native-firebase_app:android.minSdk using custom value: 21
  :react-native-firebase_app:reactNativeAndroidDir /Users/myuser/appname/appname/node_modules/react-native/android
  Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
  Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
  Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
  Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
  Checking the license for package Android SDK Build-Tools 30.0.2 in /Users/username/Library/Android/sdk/licenses
  License for package Android SDK Build-Tools 30.0.2 accepted.
  Preparing &quot;Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)&quot;.
  &quot;Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)&quot; ready.
  Installing Android SDK Build-Tools 30.0.2 in /Users/asakoulas/Library/Android/sdk/build-tools/30.0.2
  &quot;Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)&quot; complete.
  &quot;Install Android SDK Build-Tools 30.0.2 (revision: 30.0.2)&quot; finished.
  Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
  Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
  Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
  WARNING:: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2.
  Android SDK Build Tools 30.0.2 will be used.
  To suppress this warning, remove &quot;buildToolsVersion '28.0.3'&quot; from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
  WARNING:: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2.
  Android SDK Build Tools 30.0.2 will be used.
  To suppress this warning, remove &quot;buildToolsVersion '28.0.3'&quot; from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
  
  &gt; Task :app:installDebug FAILED
  Skipping device 'emulator-5554' (emulator-5554): Device is OFFLINE.
  134 actionable tasks: 2 executed, 132 up-to-date
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:installDebug'.
  &gt; com.android.builder.testing.api.DeviceException: No online devices found.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 14s
  
  error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
  Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:installDebug'.
  &gt; com.android.builder.testing.api.DeviceException: No online devices found.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 14s
  
      at makeError (/Users/username/Appname/app/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
      at /Users/username/Appname/app/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async runOnAllDevices (/Users/username/Appname/app/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
      at async Command.handleAction (/Users/username/Appname/app/node_modules/@react-native-community/cli/build/index.js:186:9)
  info Run CLI with --verbose flag for more details.
  </code></pre>
  <p>The command (react-native run-android) was working perfecly until I tried to integrate Firebase and updated Android Studio.</p>
  <p>I tried to do several things to fix this problem like reinstalling android studio or updating the sdk tools.</p>
  <p><strong>When I run (react-native run-android), the JS server runs successfully and the android emulator opens but it doesn't download the app.</strong></p>
  <p>And when I run: <strong>adb devices</strong> in my terminal I get:</p>
  <pre><code>List of devices attached
  emulator-5554   offline
  </code></pre>
  <p>I already tried to delete, cold reboot, restart the emulator but it doesn't help and always shows <strong>offline</strong>.</p>
  <p>I would really appreciate some help please.</p>
  <p>Thanks in advance!</p>