Failed to re-package resources

Guys today i tried to add Ads to my game and then try it on the phone and suddenly this came up. Does somebody know what those errors mean?

UnityException: Resource compilation failed!
Failed to recompile android resource files. See the Console for details.
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message, System.Exception ex)
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message)
UnityEditor.Android.PostProcessAndroidPlayer.CompileResources (System.String stagingArea, System.String packageName, UnityEditor.Android.AndroidLibraries androidLibraries)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at

and this one

Failed to compile resources with the following parameters:
-bootclasspath “C:/Users/Richard/Desktop/android-sdk-windows\platforms\android-24\android.jar” -d “C:\Users\Richard\Desktop\BMP Jumper\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding UTF-8 “com\MobileTest\Test\R.java” “com\unity3d\ads\android\R.java”
warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/Object.class): major version 52 is newer than 51, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/AutoCloseable.class): major version 52 is newer than 51, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
2 warnings

ailed to compile resources with the following parameters:
-bootclasspath “C:/Users/Richard/Desktop/android-sdk-windows\platforms\android-24\android.jar” -d “C:\Users\Richard\Desktop\BMP Jumper\Temp\StagingArea\bin\classes” -source 1.6 -target 1.6 -encoding UTF-8 “com\MobileTest\Test\R.java” “com\unity3d\ads\android\R.java”
warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/Object.class): major version 52 is newer than 51, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: C:\Users\Richard\Desktop\android-sdk-windows\platforms\android-24\android.jar(java/lang/AutoCloseable.class): major version 52 is newer than 51, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
2 warnings

From the error you posted:

major version 52 is newer than 51, the highest major version supported by this compiler. It is recommended that the compiler be upgraded

This usually means you’re using some code that was compiled using major version 52 (Java 8), but the Java version you have installed locally only supports classes that have a maximal version of 51.

This appears as a warning though, so i am not sure this is the root cause for the build failure. You can resolve this by installing JDK 8. Also make sure that you point Unity to use it (under Preferences → External Tools).

NOTE: In some cases, it can get a bit tricky to find out why the build fails. If all else fails, I offer a service to help fix Android related build issues (due to manifest merging, conflicting plugins, etc). Check it out if you’re unable to resolve your issues !