title: React Native - app crashes with custom build type
body: <p>I've got a react native application, that works fine in Android, in <code>debug</code> and <code>release</code> build types. I want to add a new build type called releaseStaging, so I'm adding this to the <code>app/build.gradle</code>:</p>
  <pre class="lang-json prettyprint-override"><code>
  android: {
      buildTypes: {
          releaseStaging {
              resValue &quot;string&quot;, &quot;CodePushDeploymentKey&quot;, '&quot;**something**&quot;'
              matchingFallbacks = ['release']
              signingConfig signingConfigs.release
              minifyEnabled enableProguardInReleaseBuilds
              proguardFiles getDefaultProguardFile(&quot;proguard-android.txt&quot;), &quot;proguard-rules.pro&quot;
          }
          ... debug and release defined here ...
      }
  }
  </code></pre>
  <p>I've purposely named the build type &quot;releaseStaging&quot; because from reading around I can see that the react.gradle file does certain things based on the build type containing the word &quot;release&quot;.</p>
  <p>When I do:</p>
  <p><code>npx react-native run-android --variant=releaseStaging</code></p>
  <p>It builds OK and deploys to the device I'm testing on, but it just crashes on start.</p>
  <p>On looking at logcat, I can see that the error is:</p>
  <pre><code>2022-01-26 12:26:00.494 4038-4102/? E/AndroidRuntime: FATAL EXCEPTION: create_react_context
      Process: com.myapp, PID: 4038
      java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
          SoSource 0: com.facebook.soloader.ApkSoSource[root = /data/data/com.mediaburst.timetastic/lib-main flags = 1]
          SoSource 1: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mediaburst.timetastic-jFpmTXGDULHlB6h75bUGQA==/lib/arm64 flags = 0]
          SoSource 2: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
          SoSource 3: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
          Native lib dir: /data/app/com.mediaburst.timetastic-jFpmTXGDULHlB6h75bUGQA==/lib/arm64
       result: 0
          at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:918)
          at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:740)
          at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:654)
          at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:634)
          at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:582)
          at com.facebook.hermes.reactexecutor.HermesExecutor.&lt;clinit&gt;(HermesExecutor.java:20)
          at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:29)
          at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1066)
          at java.lang.Thread.run(Thread.java:919)
  </code></pre>