title: Expo - There was a problem parsing the package Android 12 - S10e
body: <p>I've been diving around StackOverflow, Medium, and some Google, but haven't found the solution yet.</p>
  <p>I'm currently using an ejected Expo App. I need to upgrade the <code>compileSdkVersion</code> and <code>targetSdkVersion</code> to 31 as <a href="https://github.com/intercom/intercom-react-native" rel="nofollow noreferrer">Intercom</a> currently needs it.</p>
  <p>While everything else remains the same, once I change the <code>compileSdkVersion</code> and <code>targetSdkVersion</code> to the aforementioned values and download the compiled .apk <code>eas build --profile development --platform android</code> I get hit in my S10e (Android 12) with <code>There was a problem parsing the package.</code></p>
  <p>I've tried running it on an Android 9 emulator and it fails as well. Nonetheless, a Samsung Galaxy S10 with Android 11 runs it well.</p>
  <p>If I downgrade the version to 30, the project resumes and it runs well again.</p>
  <p>I've researched all these links (and more)</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/70620015/cant-install-app-from-playstore-for-android-12-targetsdk-31">Cant install app from PlayStore for Android 12 targetSDK 31</a></li>
  <li><a href="https://stackoverflow.com/questions/71825904/apk-install-failed-on-android-12">apk install failed on android 12</a></li>
  <li><a href="https://medium.com/@lewwybogus/fixing-there-was-a-problem-while-parsing-the-package-on-android-12-d62365d5a8b" rel="nofollow noreferrer">https://medium.com/@lewwybogus/fixing-there-was-a-problem-while-parsing-the-package-on-android-12-d62365d5a8b</a></li>
  <li><a href="https://stackoverflow.com/questions/27458207/what-is-the-use-of-androidexported-true-in-broadcastreceiver">What is the use of android:exported=&quot;true&quot; in BroadcastReceiver</a></li>
  <li><a href="https://stackoverflow.com/questions/67412084/android-studio-error-manifest-merger-failed-apps-targeting-android-12">Android Studio error: &quot;Manifest merger failed: Apps targeting Android 12&quot;</a></li>
  <li><a href="https://stackoverflow.com/questions/71008537/android-12-api-level-31-cant-start-exoplayer-from-the-service">Android 12 (API level 31) can&#39;t start ExoPlayer from the service</a></li>
  <li><a href="https://stackoverflow.com/questions/48112493/parse-error-there-is-a-issue-while-parsing-the-package-in-marshmallow">Parse error: there is a issue while parsing the package in marshmallow</a></li>
  </ul>
  <p>From what I've gathered, I need to update the <code>&lt;application&gt;</code> and <code>&lt;service&gt;</code>s tags with <code>android:exported=&quot;true&quot;</code> accordingly.</p>
  <p>I did that, but the .apk is still uninstallable on my device.</p>
  <p>Here's the <code>AndroidManifest.xml</code> from <code>src/main</code></p>
  <pre class="lang-xml prettyprint-override"><code>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; package=&quot;app.omitted&quot;&gt;
    &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.READ_PHONE_STATE&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.SYSTEM_ALERT_WINDOW&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.USE_BIOMETRIC&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.USE_FINGERPRINT&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.VIBRATE&quot;/&gt;
    &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;
    &lt;queries&gt;
      &lt;intent&gt;
        &lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;
        &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;
        &lt;data android:scheme=&quot;https&quot;/&gt;
      &lt;/intent&gt;
    &lt;/queries&gt;
    &lt;application android:name=&quot;.MainApplication&quot; android:label=&quot;@string/app_name&quot; android:icon=&quot;@mipmap/ic_launcher&quot; android:roundIcon=&quot;@mipmap/ic_launcher_round&quot; android:allowBackup=&quot;true&quot; android:theme=&quot;@style/AppTheme&quot; android:usesCleartextTraffic=&quot;true&quot;&gt;
      &lt;meta-data android:name=&quot;expo.modules.updates.ENABLED&quot; android:value=&quot;true&quot;/&gt;
      &lt;meta-data android:name=&quot;expo.modules.updates.EXPO_SDK_VERSION&quot; android:value=&quot;44.0.0&quot;/&gt;
      &lt;meta-data android:name=&quot;expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH&quot; android:value=&quot;ALWAYS&quot;/&gt;
      &lt;meta-data android:name=&quot;expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS&quot; android:value=&quot;0&quot;/&gt;
      &lt;meta-data android:name=&quot;expo.modules.updates.EXPO_UPDATE_URL&quot; android:value=&quot;https://exp.host/omitted&quot;/&gt;
      &lt;activity android:name=&quot;.MainActivity&quot; android:label=&quot;@string/app_name&quot; android:configChanges=&quot;keyboard|keyboardHidden|orientation|screenSize|uiMode&quot; android:launchMode=&quot;singleTask&quot; android:windowSoftInputMode=&quot;adjustResize&quot; android:theme=&quot;@style/Theme.App.SplashScreen&quot; android:screenOrientation=&quot;portrait&quot; android:exported=&quot;true&quot;&gt;
        &lt;intent-filter&gt;
          &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;
          &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;
        &lt;/intent-filter&gt;
        &lt;intent-filter&gt;
          &lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;
          &lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;
          &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;
          &lt;data android:scheme=&quot;app.pana&quot;/&gt;
          &lt;data android:scheme=&quot;exp+pana&quot;/&gt;
        &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name=&quot;com.facebook.react.devsupport.DevSettingsActivity&quot; android:exported=&quot;true&quot;/&gt;
      &lt;activity android:name=&quot;com.theartofdev.edmodo.cropper.CropImageActivity&quot; android:theme=&quot;@style/Base.Theme.AppCompat&quot; android:exported=&quot;true&quot;/&gt;
    &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  <p>eas.json</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;cli&quot;: {
          &quot;version&quot;: &quot;&gt;= 0.47.0&quot;
      },
      &quot;build&quot;: {
          &quot;development&quot;: {
              &quot;developmentClient&quot;: true,
              &quot;distribution&quot;: &quot;internal&quot;,
              &quot;android&quot;: {
                  &quot;image&quot;: &quot;ubuntu-18.04-jdk-11-ndk-r19c&quot;
              }
          },
          &quot;preview&quot;: {
              &quot;distribution&quot;: &quot;internal&quot;
          },
          &quot;production&quot;: {}
      },
      &quot;submit&quot;: {
          &quot;production&quot;: {}
      }
  }
  </code></pre>
  <p>Here's part of the build.gradle:</p>
  <pre><code>
  buildscript {
      ext {
          buildToolsVersion = &quot;31.0.0&quot;
          minSdkVersion = 21
          compileSdkVersion = 31
          targetSdkVersion = 31
      }
      repositories {
          google()
          mavenCentral()
          jcenter()
      }
      dependencies {
          classpath(&quot;com.android.tools.build:gradle:4.1.0&quot;)
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          mavenLocal()
          maven {
              // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
              url(new File([&quot;node&quot;, &quot;--print&quot;, &quot;require.resolve('react-native/package.json')&quot;].execute(null, rootDir).text.trim(), &quot;../android&quot;))
          }
          maven {
              // Android JSC is installed from npm
              url(new File([&quot;node&quot;, &quot;--print&quot;, &quot;require.resolve('jsc-android/package.json')&quot;].execute(null, rootDir).text.trim(), &quot;../dist&quot;))
          }
  
          google()
          mavenCentral()
          jcenter()
          maven { url 'https://www.jitpack.io' }
      }
  }
  </code></pre>
  <p>I don't know what else to do. Any ideas?</p>