Generate signed APK - Android Failed to execute aapt

后端 未结 2 1705
伪装坚强ぢ
伪装坚强ぢ 2020-12-21 01:34

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

相关标签:
2条回答
  • 2020-12-21 02:34

    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

    0 讨论(0)
  • 2020-12-21 02:37

    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.

    0 讨论(0)
提交回复
热议问题