Failed to re-package resources.

I have been working on my game for a month. And this problem just occured. I did google this. But i cant solve it. This does not occur when i try to build an empty scene in another project, but only in my current project. I need help.

This is the error in the console. (i dont get much of it):

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\adt-bundle-windows-x86_64-20140702\sdk\build-tools\android-4.4W\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/adt-bundle-windows-x86_64-20140702/sdk/platforms/android-20\android.jar" -F bin/resources.ap_

stderr[
AndroidManifest.xml:9: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
]
stdout[
Configurations:
 (default)
 hdpi
 ldpi
 xhdpi
 xxhdpi

Files:
  drawable\app_icon.png
    Src: () res\drawable\app_icon.png
    Src: (hdpi) res\drawable-hdpi\app_icon.png
    Src: (ldpi) res\drawable-ldpi\app_icon.png
    Src: (xhdpi) res\drawable-xhdpi\app_icon.png
    Src: (xxhdpi) res\drawable-xxhdpi\app_icon.png
  values\strings.xml
    Src: () res\values\strings.xml
  AndroidManifest.xml
    Src: () AndroidManifest.xml

Resource Dirs:
  Type drawable
    drawable\app_icon.png
      Src: () res\drawable\app_icon.png
      Src: (hdpi) res\drawable-hdpi\app_icon.png
      Src: (ldpi) res\drawable-ldpi\app_icon.png
      Src: (xhdpi) res\drawable-xhdpi\app_icon.png
      Src: (xxhdpi) res\drawable-xxhdpi\app_icon.png
  Type values
    values\strings.xml
      Src: () res\values\strings.xml
Including resources from package: C:\adt-bundle-windows-x86_64-20140702\sdk\platforms\android-20\android.jar
applyFileOverlay for drawable
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res\drawable\app_icon.png
Processing image: res\drawable-hdpi\app_icon.png
Processing image: res\drawable-ldpi\app_icon.png
Processing image: res\drawable-xhdpi\app_icon.png
    (processed image res\drawable-ldpi\app_icon.png: 114% size of source)
Processing image: res\drawable-xxhdpi\app_icon.png
    (processed image res\drawable\app_icon.png: 104% size of source)
    (processed image res\drawable-hdpi\app_icon.png: 96% size of source)
    (processed image res\drawable-xhdpi\app_icon.png: 94% size of source)
    (processed image res\drawable-xxhdpi\app_icon.png: 97% size of source)
    (new resource id app_icon from drawable\app_icon.png #generated)
    (new resource id app_icon from hdpi\drawable\app_icon.png #generated)
    (new resource id app_icon from ldpi\drawable\app_icon.png #generated)
    (new resource id app_icon from xhdpi\drawable\app_icon.png #generated)
    (new resource id app_icon from xxhdpi\drawable\app_icon.png #generated)
]

To fix this error, you have to copy the version.xml file from

android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/

into Assets/Plugins/Android/res/values/ of your Unity project’s folder.

Moro! I had this issue when I was trying to push my project to Android. Here is the Fix(Founded in reddit) that worked for me.

  1. Find and open your SDK Manager.exe at android-sdk folder.

  2. under tool, have Android SDK tools 25.1.7 and Android SDK Platfomr-tools 24 installed.

  3. uninstall Android SDK Build-tools 24 and install 23.0.1 instead.

Done.

I found a better solution:
Copy google-play-services_lib folder to Plugins/Android, so you don’t have to hard code Google Play Service’s value.

The issue is that you have an AndroidManifest.xml file (Probably under Plugins/Android or a plugin in a subfolder of this folder) that tries to access a resource by name (google_play_services_version), but this value is never defined anywhere.

Usually, this value is added via some method such as adding it to the AndroidManifest.xml or to an xml under res/values.

For example, see the documentation here (under Add the Google Play services version to your app’s manifest).

**NOTE: ** Sometimes, it can get a bit tricky to find out why the build fails. If all else fails, i recommend you to check out this link - it is a professional 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 !

RESOLVED !!!
I was facing this issue while integrating AdMob and ChartBoost via Prime[31]. his issue was resolved by following steps.

  1. Delete all plugin Directories.
  2. Import first plugin
  3. import second plugin but remember to uncheck google-game-palay services_lib folder

its done

If you are getting that error as a result of Facebook Unity SDK integration
This guy has a simple and easy solution

I was having this issue because Unity needs Java JDK 8, and I had JDK 7 installed. Installing JDK 8 and pointing Unity to it solved the issue.

Cause of Problem: When using Unity’s internal build system, minSdkVersion setting in all AndroidManifest.xml files must not be below the minSdkVersion allowed by Unity’s internal build system (this includes AndroidManifest.xml files inside libraries and archives e.g .jar and .aar archives). Otherwise this problem occurs. The inconsistent minSdkVersion specifications usually are in AndroidManifest.xml files that come with external plugins. Note: To see the minSdkVersion allowed by Unity’s internal build system see the “Player Settings” in the Unity Editor.

Solution to Problem: Remove all tags from all AndroidManifest.xml found in any used plugin, including those inside jar and aar files (requires unpacking jar and aar files and, optionally, repacking them after modifying their AndroidManifest.xml files; note that unpacked library folders can also be imported into Unity plugin folders).

,

Hello, I’m having the same error with android build tools 23.0.1 too.
here is the error log:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
/Users/user1/Downloads/Android/android-sdk-macosx/build-tools/23.0.1/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S “res” -I “/Users/user1/Downloads/Android/android-sdk-macosx/platforms/android-23/android.jar” -F bin/resources.ap_ --extra-packages com.android.vending.billing:com.unity.purchasing.googleplay:android.support.v7.cardview:android.support.v7.cardview:com.unity.purchasing:com.facebook:com.facebook:com.facebook.android:com.facebook.android:android.support.v4:android.support.v4 -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/GoogleAIDL/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/GooglePlay/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.2.1/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/common/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.9.0/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-wrapper-7.4.0/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-wrapper-7.5.0/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/support-v4-23.1.1/res” -S “/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/support-v4-23.2.1/res”

stderr[
/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/layout/com_facebook_device_auth_dialog_fragment.xml:117: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from
/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/layout/com_facebook_device_auth_dialog_fragment.xml:88: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from
/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/layout/com_facebook_device_auth_dialog_fragment.xml:70: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from
/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/layout/com_facebook_device_auth_dialog_fragment.xml:56: note: removing attribute http://schemas.android.com/apk/res/android:fontFamily from
/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/layout/com_facebook_device_auth_dialog_fragment.xml: note: using v16 attributes; synthesizing resource COM.INCUBATOR.PILLSAGA:layout/com_facebook_device_auth_dialog_fragment for configuration v16.
/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:23: error: Attribute “com_facebook_foreground_color” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:23: error: Attribute “com_facebook_object_id” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:23: error: Attribute “com_facebook_object_type” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:23: error: Attribute “com_facebook_style” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:23: error: Attribute “com_facebook_auxiliary_view_position” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:23: error: Attribute “com_facebook_horizontal_alignment” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:24: error: Attribute “com_facebook_confirm_logout” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:24: error: Attribute “com_facebook_login_text” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:24: error: Attribute “com_facebook_logout_text” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:24: error: Attribute “com_facebook_tooltip_mode” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:25: error: Attribute “com_facebook_preset_size” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/facebook-android-sdk-4.11.0/res/values/values.xml:25: error: Attribute “com_facebook_is_cropped” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “cardBackgroundColor” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “cardCornerRadius” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “cardElevation” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “cardMaxElevation” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “cardUseCompatPadding” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “cardPreventCornerOverlap” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “contentPadding” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “contentPaddingLeft” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “contentPaddingRight” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “contentPaddingTop” has already been defined

/Users/user1/Desktop/clientsProject/Project/Pill Saga/Temp/StagingArea/android-libraries/cardview-v7-23.1.1/res/values/values.xml:9: error: Attribute “contentPaddingBottom” has already been defined

]
stdout[
Configurations:
(default)

Files:
AndroidManifest.xml
Src: () AndroidManifest.xml

Resource Dirs:
Including resources from package: /Users/user1/Downloads/Android/android-sdk-macosx/platforms/android-23/android.jar
applyFileOverlay for drawable
trying overlaySet Key=com_facebook_auth_dialog_background.xml
trying overlaySet Key=com_facebook_auth_dialog_cancel_background.xml
trying overlaySet Key=com_facebook_auth_dialog_header_background.xml
trying overlaySet Key=com_facebook_button_background.xml
trying overlaySet Key=com_facebook_button_icon.xml
trying overlaySet Key=com_facebook_button_icon_blue.png
trying overlaySet Key=com_facebook_button_icon_white.png
trying overlaySet Key=com_facebook_button_like_background.xml
trying overlaySet Key=com_facebook_button_like_icon_selected.png
trying overlaySet Key=com_facebook_button_login_silver_background.xml
trying overlaySet Key=com_facebook_button_send_background.xml
trying overlaySet Key=com_facebook_button_send_icon_blue.png
trying overlaySet Key=com_facebook_button_send_icon_white.png
trying overlaySet Key=com_facebook_close.png
trying overlaySet Key=com_facebook_favicon_white.png
trying overlaySet Key=com_facebook_profile_picture_blank_portrait.png
trying overlaySet Key=com_facebook_profile_picture_blank_square.png
trying overlaySet Key=com_facebook_send_button_icon.xml
trying overlaySet Key=com_facebook_tooltip_black_background.9.png
trying overlaySet Key=com_facebook_tooltip_black_bottomnub.png
trying overlaySet Key=com_facebook_tooltip_black_topnub.png
trying overlaySet Key=com_facebook_tooltip_black_xout.png
trying overlaySet Key=com_facebook_tooltip_blue_background.9.png
trying overlaySet Key=com_facebook_tooltip_blue_bottomnub.png
trying overlaySet Key=com_facebook_tooltip_blue_topnub.png
trying overlaySet Key=com_facebook_tooltip_blue_xout.png
trying overlaySet Key=messenger_bubble_large_blue.png
trying overlaySet Key=messenger_bubble_large_white.png
trying overlaySet Key=messenger_bubble_small_blue.png
trying overlaySet Key=messenger_bubble_small_white.png
trying overlaySet Key=messenger_button_blue_bg_round.xml
trying overlaySet Key=messenger_button_blue_bg_selector.xml
trying overlaySet Key=messenger_button_send_round_shadow.png
trying overlaySet Key=messenger_button_white_bg_round.xml
trying overlaySet Key=messenger_button_white_bg_selector.xml
trying overlaySet Key=com_facebook_auth_dialog_background.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_auth_dialog_background.xml, for flavor
trying overlaySet Key=com_facebook_auth_dialog_cancel_background.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_auth_dialog_cancel_background.xml, for flavor
trying overlaySet Key=com_facebook_auth_dialog_header_background.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_auth_dialog_header_background.xml, for flavor
trying overlaySet Key=com_facebook_button_background.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_button_background.xml, for flavor
trying overlaySet Key=com_facebook_button_icon.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_button_icon.xml, for flavor
trying overlaySet Key=com_facebook_button_icon_blue.png
baseFile 0 has flavor mdpi-v4
baseFile 1 has flavor hdpi-v4
baseFile 2 has flavor xhdpi-v4
baseFile 3 has flavor xxhdpi-v4
overlayFile 0 has flavor mdpi-v4
overlayFile 1 has flavor hdpi-v4
overlayFile 2 has flavor xhdpi-v4
overlayFile 3 has flavor xxhdpi-v4
found a match (0) for overlay file com_facebook_button_icon_blue.png, for flavor mdpi-v4
found a match (1) for overlay file com_facebook_button_icon_blue.png, for flavor hdpi-v4
found a match (2) for overlay file com_facebook_button_icon_blue.png, for flavor xhdpi-v4
found a match (3) for overlay file com_facebook_button_icon_blue.png, for flavor xxhdpi-v4
trying overlaySet Key=com_facebook_button_icon_white.png
baseFile 0 has flavor mdpi-v4
baseFile 1 has flavor hdpi-v4
baseFile 2 has flavor xhdpi-v4
baseFile 3 has flavor xxhdpi-v4
overlayFile 0 has flavor mdpi-v4
overlayFile 1 has flavor hdpi-v4
overlayFile 2 has flavor xhdpi-v4
overlayFile 3 has flavor xxhdpi-v4
found a match (0) for overlay file com_facebook_button_icon_white.png, for flavor mdpi-v4
found a match (1) for overlay file com_facebook_button_icon_white.png, for flavor hdpi-v4
found a match (2) for overlay file com_facebook_button_icon_white.png, for flavor xhdpi-v4
found a match (3) for overlay file com_facebook_button_icon_white.png, for flavor xxhdpi-v4
trying overlaySet Key=com_facebook_button_like_background.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_button_like_background.xml, for flavor
trying overlaySet Key=com_facebook_button_like_icon_selected.png
baseFile 0 has flavor mdpi-v4
baseFile 1 has flavor hdpi-v4
baseFile 2 has flavor xhdpi-v4
baseFile 3 has flavor xxhdpi-v4
overlayFile 0 has flavor mdpi-v4
overlayFile 1 has flavor hdpi-v4
overlayFile 2 has flavor xhdpi-v4
overlayFile 3 has flavor xxhdpi-v4
found a match (0) for overlay file com_facebook_button_like_icon_selected.png, for flavor mdpi-v4
found a match (1) for overlay file com_facebook_button_like_icon_selected.png, for flavor hdpi-v4
found a match (2) for overlay file com_facebook_button_like_icon_selected.png, for flavor xhdpi-v4
found a match (3) for overlay file com_facebook_button_like_icon_selected.png, for flavor xxhdpi-v4
trying overlaySet Key=com_facebook_button_login_silver_background.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_button_login_silver_background.xml, for flavor
trying overlaySet Key=com_facebook_button_send_background.xml
baseFile 0 has flavor
overlayFile 0 has flavor
found a match (0) for overlay file com_facebook_button_send_background.xml, for flavor
trying overlaySet Key=com_facebook_button_send_icon_blue.png
baseFile 0 has flavor mdpi-v4
baseFile 1 has flavor hdpi-v4
baseFile 2 has flavor xhdpi-v4
overlayFile 0 has flavor mdpi-v4
overlayFile 1 has flavor hdpi-v4
overlayFile 2 has flavor xhdpi-v4
found a match (0) for overlay file com_facebook_button_send_icon_blue.png, for flavor mdpi-v4
found a match (1) for overlay file com_facebook_button_send_icon_blue.png, for flavor hdpi-v4
found a match (2) for overlay file com_facebook_button_send_icon_blue.png, for flavor xhdpi-v4
trying overlaySet Key=com_facebook_button_send_icon_white.png
baseFile 0 has flavor mdpi-v4
baseFile 1 has flavor hdpi-v4
baseFile 2 has flavor xhdpi-v4
baseFile 3 has flavor xxhdpi-v4
overlayFile 0 has flavor mdpi-v4
overlayFile 1 has flavor hdpi-v4
overlayFile 2 has flavor xhdpi-v4
overlayFile 3 has flavor xxhdpi-v4
found a match (0) for overlay file com_facebook_button_send_icon_white.png, for flavor mdpi-v4
found a match (1) for overlay file com_facebook_button_send_icon_white.png, for flavor hdpi-v4
found a match (2) for overlay file com_facebook_button_send_icon_white.png, for flavor xhdpi-v4
found a match (3) for overlay file com_facebook_button_send_icon_white.png, for flavor xxhdpi-v4
trying overlaySet Key=com_facebook_close.png
baseFile 0 has flavor mdpi-v4
baseFile 1 has flavor hdpi-v4
baseFile 2 has flavor xhdpi-v4
overlayFile 0 has flavor mdpi-v4
overlayFile 1 has flavor hdpi-v4
overlayFile 2 has flavor xhdpi-v4
found a match (0) for overlay file com_facebook_close.png, for flavor mdpi-v4
found a match (1) for overlay file com_facebook_close.png, for flavor hdpi-v4
found a match (2) for overlay file com_facebook_close.png, for flavor xhdpi-v4
trying overlaySet Key=com_facebook_favicon_white.png
baseFile 0 has flavor mdpi-v4
baseFile 1 has flavor hdpi-v4
baseFile 2 has flavor xhdpi-v4
baseFile 3 has flavor xxhdpi-v4
overlayFile 0 has flavor mdpi-v4
overlayFile 1 has flavor hdpi-v4
overlayFile 2 has flavor xhdpi-v4
overlayFile 3 has flavor xxhdpi-v4
found a match (0) for overlay file com_facebook_favicon_white.png, for flavor mdpi-v4
found a match (1) for overlay file com_facebook_favicon_white.png, for flavor hdpi-v4
found a match (

can anyone help?

Do not get panic just remove the latest sdk version from build-tools in your android sdk folder.
It will definitely works.
Remove 24.0.0 and above
Happy coding

I was having this issue because Unity needs Java JDK 8, and I had JDK 7 installed. Installing JDK 8 and pointing Unity to it solved the issue.

The fix my build needed was to Download the right SDK of the device that you’re deploying your game/app to.
To do that:

  1. Check in the Settings>About Device>Android version
  2. Open the SDK manager and select and download the right SDK (as of the Android version) of the device you’re deploying to.

Hope it works for you too.

Here is A New Video On Fixing All AdMob Problems in Unity (in Hindi/Language) YouTube Link UNITY AdMob Problem Fixed Ads Not Showing ☑ - YouTube

Player Settigs → Target API Level ->API Level 21 yapınca hata düzeldi

check your plugin/android folder you may have some duplicate files with different version like : play-services-ads-lite-9.2.1 , play-services-ads-lite-10.2.1. delete one of them , it worked fine.

just remove everything from admob plugin and import new/old version of plugin