0
votes

I got the below error when i tried to build a apk fron react-native using this command ./gradlew assembleRelease

D:\tmp\taamapp\android\app\build\intermediates\res\merged\release\drawable-hdpi\node_modules_reactnavigationstack_src_views_assets_backicon.png: error: uncompiled PNG file passed as argument. Must be compiled first into .flat file.. error: failed parsing overlays.

1

1 Answers

0
votes

There's another option you can try in gradle.properties which is org.gradle.configureondemand=true. So use that instead of android.enableAapt2=false.

  • and removed all drawable* folders

rm -rf android/app/src/main/res/drawable-*

  • use the following command to bundle assets:

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

Run ./gradlew clean after.

hope it will help you :)