-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
This is basically a "reload" of issue #1976 because it became polluted and hard to follow.
Current Behavior
When using Android Studio 3.0, gradle 4.1 & gradle tools 3.0.0 (build tools 26.0.2) (or higher), creating a production release is impossible because of this error:
uncompiled PNG file passed as argument. Must be compiled first into a .flat file.. error: failed parsing overlays.
Which is it's caused by the asset files that gets bundled, like: node_modules_reactnavigation_src_views_assets_backicon.png
It's clearly related to AAPT2, the new version present in gradle tools 3.0 - but even the migration guide doesn't seem to offer an explanation for this kind of error. This SO answer seems to provide some more details but, yeah, until better explanations here are some workarounds:
- set
android.enableAapt2=false
in[YOUR PROJECT]/android/gradle.properties
- The react-navigation picture resource may cause a package error? #1976 (comment)
- The react-navigation picture resource may cause a package error? #1976 (comment)
- The react-navigation picture resource may cause a package error? #1976 (comment)
Expected Behavior
That everything gets bundled properly with AAPT2.
Your Environment
As already stated, Android Studio 3.0, gradle 4.1 & gradle tools 3.0.0 (build tools 26.0.2). Doesn't look like it's related to rn/navigation versions, but still happens with latest:
software | version |
---|---|
react-navigation | beta.21 |
react-native | 0.51 |
node | 8.9.x |
yarn | 1.3.2 |