- Home /
unity wont recompile when using ads
hello. I have a problem with unity. My game worked great and the scenes compiled just fine until i started using unity ads. I am working for android so when i try to build the game it says "Failed to recompile android resourses. check console for more detailes." Below is the error i get in the console. Please help me. I have tried everything. Changed platforms in the AppData/local/Android/Sdk/platforms. i have instaled all the java jdk's from 8 to 10 none is working. Without the ads the game would build just fine but now i dont know what is happening.
HERE IS THE CONSOLE ERRORS.
CommandInvokationFailure: Failed to recompile android resource files. C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe -bootclasspath "C:/Users/Njazi/AppData/Local/Android/Sdk\platforms\android-28\android.jar" -d "C:\Users\Njazi\Desktop\Allexamples\fastis\Endless\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\this\Endless\R.java" "com\unity3d\ads\R.java"
stderr[ com\this\Endless\R.java:8: error: as of release 8, 'this' is allowed as the parameter name for the receiver type only, which has to be the first parameter package com.this.Endless; ^ 1 error ] stdout[
] exit code: 1 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg) UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.HostView:OnGUI()
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors. at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162 at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83 UnityEditor.HostView:OnGUI()
Your answer
![](https://koobas.hobune.stream/wayback/20220612175353im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do i exactly implement Admob Ads into my game ? 0 Answers
unity ads after google play publishing ?? 0 Answers
Copyright ? 2 Answers
Ads shows in the editor but not in the Game? please help. 0 Answers
How to get the Ads SDK for Unity 5.6.7f1 0 Answers