expo / examples

Example projects that demonstrate how to use Expo APIs and integrate Expo with other popular tools
2.14k stars 853 forks source link

expo prebuild and run:android suddenly stopped working #462

Closed troyshu closed 5 months ago

troyshu commented 5 months ago

Describe the bug npx expo prebuild and npx expo run:android commands suddenly started failing with errors for me (Expo 50). npx expo run:ios runs fine.

npx expo prebuild produces:

Error: [android.manifest]: withAndroidManifestBaseMod: A runtime version is set in your AndroidManifest.xml, but is missing from your app.json/app.config.js. Please either set runtimeVersion in your app.json/app.config.js or remove expo.modules.updates.EXPO_RUNTIME_VERSION from your AndroidManifest.xml.

npx expo run:android produces:

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR: /Users/troyshu/Documents/projects/.../expo-50-androidmanifest/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:3: AAPT: error: resource color/iconBackground (aka com.expo50androidmanifest:color/iconBackground) not found.

     ERROR: /Users/troyshu/Documents/projects/.../expo-50-androidmanifest/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:3: AAPT: error: resource color/iconBackground (aka com.expo50androidmanifest:color/iconBackground) not found.

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/troyshu/expo-50-androidmanifest
  2. Run npx expo prebuild

My sample repo is simply a new Expo project created with npx create-expo-app.

Expected behavior npx expo prebuild and npx expo run:android to run without error in a brand new Expo project.

Desktop (please complete the following information):

Edit: wrong repo