error: uncompiled PNG file passed as argument. Must be compiled first into .flat file

Arif picture Arif · Apr 28, 2018 · Viewed 7.6k times · Source

In react-native, I am trying to generate signed APK following their instructions. But when I execute this ./gradlew assembleRelease command it shows me this error. Error details.

My platform:

  • OS: Windows 10
  • node: 8.9.1
  • npm: 5.5.1
  • react: 16.3.2
  • react-native: 0.55

Can anybody tell me, why I am getting this error?

I got a solution here by adding android.enableAapt2=false into android/gradle.properties. Apparently, I read that it's only a temporary solution. No way to solve it with others solutions?

Answer

Moesio picture Moesio · Sep 13, 2018

Add org.gradle.configureondemand=true to android/gradle.properties