title: Error when trying to run my React Native app on Android
body: <p>I've built my React Native app and tested and troubleshooted with my iOS devices for months. Now I'm trying to built and test the app on Android for the first time. The thing is, that I keep getting errors trying to run the Android-version of my app. After hours of debugging and troubleshooting, I tried to create a new RN project and see if that could run on my emulator and device. I got that part working and then I wanted to copy/paste the files of my existing app project into the new project.</p>
  <p>I pasted my existing assets, styles, the source JS-files and the package.json file into the new project, ran <code>npm install</code> and then I ended up with the exact same error message as I had in the original project when I run <code>react-native run-android</code>.</p>
  <p>The full error message is here:</p>
  <pre><code>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
  Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
  Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
  Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
  Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
  Warning: 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
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:mergeDebugAssets'.
  &gt; Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
     &gt; Could not find com.facebook.yoga:proguard-annotations:1.14.1.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
         - https://repo.maven.apache.org/maven2/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
         - file:/Users/MyUser/.m2/repository/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
         - file:/Users/MyUser/MyAppFolder/MyApp/node_modules/react-native/android/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
         - file:/Users/MyUser/MyAppFolder/MyApp/node_modules/jsc-android/dist/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
         - https://www.jitpack.io/com/facebook/yoga/proguard-annotations/1.14.1/proguard-annotations-1.14.1.pom
       Required by:
           project :app &gt; com.facebook.react:react-native:0.64.2
     &gt; Could not find com.facebook.fbjni:fbjni-java-only:0.0.3.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
         - https://repo.maven.apache.org/maven2/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
         - file:/Users/MyUser/.m2/repository/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
         - file:/Users/MyUser/MyAppFolder/MyApp/node_modules/react-native/android/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
         - file:/Users/MyUser/MyAppFolder/MyApp/node_modules/jsc-android/dist/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
         - https://www.jitpack.io/com/facebook/fbjni/fbjni-java-only/0.0.3/fbjni-java-only-0.0.3.pom
       Required by:
           project :app &gt; com.facebook.react:react-native:0.64.2
     &gt; Could not find com.yqritc:android-scalablevideoview:1.0.4.
       Searched in the following locations:
         - https://dl.google.com/dl/android/maven2/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
         - https://repo.maven.apache.org/maven2/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
         - file:/Users/MyUser/.m2/repository/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
         - file:/Users/MyUser/MyAppFolder/MyApp/node_modules/react-native/android/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
         - file:/Users/MyUser/MyAppFolder/MyApp/node_modules/jsc-android/dist/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
         - https://www.jitpack.io/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom
       Required by:
           project :app &gt; project :react-native-video
  
  * 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 10s
  
      at makeError (/Users/MyUser/MyAppFolder/MyApp/node_modules/execa/index.js:174:9)
      at /Users/MyUser/MyAppFolder/MyApp/node_modules/execa/index.js:278:16
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async runOnAllDevices (/Users/MyUser/MyAppFolder/MyApp/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
      at async Command.handleAction (/Users/MyUser/MyAppFolder/MyApp/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:186:9)
  </code></pre>
  <p>I've tried to run <code>./gradlew clean</code> in the android-folder without any luck. My build.gradle-file looks like this:</p>
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      ext {
          buildToolsVersion = &quot;30.0.2&quot;
          minSdkVersion = 21
          compileSdkVersion = 30
          targetSdkVersion = 30
          ndkVersion = &quot;20.1.5948944&quot;
          kotlinVersion = &quot;1.3.72&quot;
      }
      repositories {
          repositories {
              google()
              maven { url 'https://maven.google.com' }
              mavenLocal()
              mavenCentral()
  
             // jcenter()
              maven {
                  // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
                  url &quot;$rootDir/../node_modules/react-native/android&quot;
              }
          }
      }
      dependencies {
          classpath(&quot;com.android.tools.build:gradle:4.2.1&quot;)
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion&quot;
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          mavenCentral()
  
          mavenLocal()
          maven {
              // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
              url(&quot;$rootDir/../node_modules/react-native/android&quot;)
          }
          maven {
              // Android JSC is installed from npm
              url(&quot;$rootDir/../node_modules/jsc-android/dist&quot;)
          }
  
          maven { url 'https://www.jitpack.io' }
      }
  }
  </code></pre>
  <p>Please let me know if you know what to do or if you have experienced a similar issue!</p>