FAILED Building Apk in React Native

Viewed 1054

I've got this error when I try to build apk file with ./gradlew bundleRelease

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:bundleReleaseResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed C:\Users\Yoan\React Native\new\app\android\app\build\intermediates\bundle_manifest\release\processReleaseManifest\bundle-manifest\AndroidManifest.xml:13: AAPT: error: resource mipmap/ic_launcher (aka com.hotelmaids:mipmap/ic_launcher) not found.

 C:\Users\Yoan\React Native\new\app\android\app\build\intermediates\bundle_manifest\release\processReleaseManifest\bundle-manifest\AndroidManifest.xml:13:

AAPT: error: resource mipmap/ic_launcher_round (aka com.hotelmaids:mipmap/ic_launcher_round) not found.

I delete those folders. I found somewhere that people and console say they are duplicated and I had another errors

enter image description here

1 Answers

run this command before your APK build:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res --verbose

and then delete the raw + drawable-.. folders.

dont delete mipmap folders!

Related