Tarun Deep Attri
Tarun Deep Attri

Reputation: 8674

Execution failed for task ':app:transformClassesAndResourcesWithR8ForDebug' Issue

After upgrading the gradle to com.android.tools.build:gradle:3.3.0-alpha07 today, I am facing one issue with build:

Task :app:transformClassesAndResourcesWithR8ForDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:transformClassesAndResourcesWithR8ForDebug'.

java.lang.NullPointerException (no error message)

I have tried following steps to fix this issue :

Note : Issue exists when I set following values to true :

        minifyEnabled true
        shrinkResources true

If I make them false, Build succeeds. But still issue persist with them being true. Can anyone help in this?

Upvotes: 1

Views: 1630

Answers (1)

JaydeepW
JaydeepW

Reputation: 3285

This may not be the exact solution but something similar happened with me. However, I had updated my dependencies to AndroidX.

Keeping

minifyEnabled true shrinkResources true

will require you to also update app's proguard-rules file. After which only your app will compile. I hope this gives you some pointers in figuring out a solution.

Upvotes: 1

Related Questions