I have a issue when trying to build Android version in Unity3d

I have tried building my app in Unity3d in both Gradle and Internal but both times I get errors at the end of building processes. I also have some plugins in my app so I tried changing SDK and made sure all the plugins are imported into my assets but that didn’t help.

Error when build system is Gradle:

CommandInvokationFailure: Gradle build failed. 
C:/Program Files/Java/jdk1.8.0_181\bin\java.exe -classpath 



"C:\ProgramFiles\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\
gradle\li 
b\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "- 
Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

stderr[
Note: C:\Users\Hendrik\Desktop\POOWA- 
master\Temp\gradleOut\src\main\java\com\google\unity\ads\Banner.java uses or 
overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformDexWithDexForRelease'.
> com.android.build.api.transform.TransformException: 
com.android.ide.common.process.ProcessException: 
java.util.concurrent.ExecutionException: 
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 
65536

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or -- 
debug option to get more log output.

* Get more help at https://help.gradle.org

Error when build system is Internal:

CommandInvokationFailure: Failed to re-package resources.
E:\sdkandroid\build-tools\27.0.3\aapt.exe package --auto-add-overlay -v -f - 
m -J "gen" -M "AndroidManifest.xml" -S "res" -I 
"E:/sdkandroid\platforms\android-28\android.jar" -F bin/resources.ap_ -- 
extra-packages 

These are not complete errors, but I think these still should show what’s wrong. I could also provide more if needed.