2

Facing problem while running ./gradlew assembleRelease to generate APK in react native.

Error: Uncompiled PNG file passed as argument. Must be compiled first into .flat file.. error: failed parsing overlays

I already tried setting android.enableAapt2=false. It allows me to generate APK but unable to install APK in device using generated APK.

Actually I am using react-native-camera in application with following

classpath 'com.android.tools.build:gradle:3.1.0',
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

How can I resolve this issue?

bennygenel
  • 23,896
  • 6
  • 65
  • 78

1 Answers1

3

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

Run ./gradlew clean after.

Johanna Larsson
  • 10,531
  • 6
  • 39
  • 50