I have built this app many times on my phone and everything was fine until i added Ad mob. Anyone know what should do the fix?
C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.3.4f1\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'.
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
The following AndroidX dependencies are detected: androidx.versionedparcelable:versionedparcelable:1.1.1, androidx.appcompat:appcompat:1.2.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.exifinterface:exifinterface:1.0.0, androidx.viewpager2:viewpager2:1.0.0, androidx.activity:activity:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.work:work-runtime:2.7.0, androidx.annotation:annotation:1.3.0, androidx.lifecycle:lifecycle-service:2.1.0, androidx.startup:startup-runtime:1.0.0, androidx.room:room-common:2.2.5, androidx.lifecycle:lifecycle-common:2.3.1, androidx.lifecycle:lifecycle-viewmodel:2.1.0, androidx.browser:browser:1.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.recyclerview:recyclerview:1.1.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.print:print:1.0.0, androidx.lifecycle:lifecycle-runtime:2.3.1, androidx.core:core:1.7.0, androidx.room:room-runtime:2.2.5, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.fragment:fragment:1.1.0, androidx.customview:customview:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.sqlite:sqlite:2.1.0, androidx.annotation:annotation-experimental:1.1.0, androidx.loader:loader:1.0.0, androidx.core:core-ktx:1.7.0, androidx.sqlite:sqlite-framework:2.1.0, androidx.collection:collection:1.1.0, androidx.viewpager:viewpager:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.arch.core:core-common:2.1.0, androidx.multidex:multidex:2.0.1, androidx.savedstate:savedstate:1.0.0, androidx.appcompat:appcompat-resources:1.2.0, androidx.concurrent:concurrent-futures:1.0.0, androidx.lifecycle:lifecycle-livedata:2.1.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.tracing:tracing:1.0.0, androidx.lifecycle:lifecycle-livedata-core:2.1.0, androidx.arch.core:core-runtime:2.1.0, androidx.documentfile:documentfile:1.0.0, androidx.vectordrawable:vectordrawable-animated:1.1.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.vectordrawable:vectordrawable:1.1.0, androidx.transition:transition:1.2.0
* 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 2s
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
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <c3a2c42a45424b88b29dfadf7f497cbb>: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 <c3a2c42a45424b88b29dfadf7f497cbb>: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 <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <c3a2c42a45424b88b29dfadf7f497cbb>: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 <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <c3a2c42a45424b88b29dfadf7f497cbb>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <c3a2c42a45424b88b29dfadf7f497cbb>: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 <36f62d8e760b48f7af5d32916f997ce1>:0)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()