I m trying to generate a signed APK for android with react-native. If the debug\'s build works well, when I try to launch the ./gradlew assembleRelease
to creat
For me disabling aapt2 wasn't enough.
What did work was going to android/app/src/main/res
and looking in all the drawable folders for png files other than the launch_screen.png.
Once I deleted all these files, the problem was solved.
Copying from the comment so it's easier to find...
This is caused by react-native adding uncompiled files to the merged resources directory. It got away with it with AAPT1 because the merged files didn't need to be compiled, but AAPT2 ones are compiled while being merged.
React-native owners need to update their code to pass these files as input to the merge resources task instead of dumping it uncompiled into the merged directory. They say they fixed it in the newest version, or at least provided a workaround: github.com/facebook/react-native/pull/17967