Error:Execution failed for task ':app:transformDexWithDexForRelease'

I am trying to build my signed apk but I am facing this error.

`[although its running fine on my phone while i am testing it]

Error message

Error:Execution failed for task ':app:transformDexWithDexForRelease'.

java.lang.NullPointerException (no error message)`

2 answers

  • answered 2018-01-14 12:18 Abu Mohammad Rasel

    Try adding following code in your pro guard file

    -dontwarn java.nio.file.*
    -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
    -dontwarn okio.**

  • answered 2018-01-14 12:42 Mohammed Muzaffar

    This error happened because of miss match in the dependencies.