Hi I am trying to implement Vungle ads in Unity. My adsense account got closed for invalid clicks though I really am innocent. So for that reason even Google Mobile ads plugin is also there in my project
So I tried to integrate Vungle ads after following this guide and a hell lot of problems are cropping. Here is the screenshot of the same
So the first error is like this:
> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
I tried to solve this by this answer here(I made it 3.4.0 from 4.0.1' , but still that doesn't solve the problem. Infact it says depricated Gradle features were used. The full error is as follows and the screenshot of the error here :
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
For the next error as mentioned here I followed this answer and checked that these were already there as per here
android.useAndroidX=true android.enableJetifier=true
I have added the dependency as mentioned in the guide here. You can see the screenshot of the same here.
Here are the errors in detail
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':launcher:debugRuntimeClasspath'.
> Could not find com.google.firebase:firebase-app-unity:8.7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- https://jcenter.bintray.com/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity-8.7.0.jar
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity.jar
- https://maven.google.com/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- file:////Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- file:/C:/Users/cheth/.m2/repository/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
Required by:
project :launcher > project :unityLibrary
> Could not find com.google.firebase:firebase-messaging-unity:8.7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- https://jcenter.bintray.com/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-messaging-unity-8.7.0.jar
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-messaging-unity.jar
- https://maven.google.com/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- file:////Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- file:/C:/Users/cheth/.m2/repository/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
Required by:
project :launcher > project :unityLibrary
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 11s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
and
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.2.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.2.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':launcher:debugRuntimeClasspath'.
> Could not find com.google.firebase:firebase-app-unity:8.7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- https://jcenter.bintray.com/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity-8.7.0.jar
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity.jar
- https://maven.google.com/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- file:////Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- file:/C:/Users/cheth/.m2/repository/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-app-unity/8.7.0/firebase-app-unity-8.7.0.pom
Required by:
project :launcher > project :unityLibrary
> Could not find com.google.firebase:firebase-messaging-unity:8.7.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- https://jcenter.bintray.com/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-messaging-unity-8.7.0.jar
- file:/C:/Users/cheth/FlappyBirdX/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-messaging-unity.jar
- https://maven.google.com/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- file:////Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- file:/C:/Users/cheth/.m2/repository/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-messaging-unity/8.7.0/firebase-messaging-unity-8.7.0.pom
Required by:
project :launcher > project :unityLibrary
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 11s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <674ff79a87ce43deb10cddc279e66761>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <674ff79a87ce43deb10cddc279e66761>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <674ff79a87ce43deb10cddc279e66761>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <3cbc70f1ae9747e88614d75932150c59>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Also I removed the Google Mobile ads folder in Project folder still I am getting the error like