Unity android project won't build after integrating unity ads

Hi, my name is Ayaan. This is my first android game (for release) using unity and I decided to implement ads as this would be a learning for my career in Unity.

I implemented the functionality of the ads and was trying to build the game when I encountered this error: “Unable to find jar in the system path”. I watched numerous youtube tutorials and finally solved this error. Unfortunately, solving this error threw me another error.

“Issue with android dependencies detected: … include Custom Main gradle file”.

Solving this error threw me yet another error (I haven’t been able to solve this) :

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (androidx.core:core:1.2.0) and classes.jar (com.android.support:support-compat:26.1.0)link text