- Home /
Google Admob - Android build problem
Hi, i am using Unity 4.7.1 and Google Mobile Ads Unity Plugin v3.0.5 After adding abmob plugin , i cant take build . Following error is showing
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
D:\InstallLocation\Android_SDK\build-tools\23.0.3\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "D:/InstallLocation/Android_SDK/platforms/android-23\android.jar" -F bin/resources.ap_ --extra-packages com.google.unity
stderr[
AndroidManifest.xml:17: error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.IAPTheme').
AndroidManifest.xml:19: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
]
stdout[
Configurations:
(default)
Files:
drawable\app_icon.png
Src: () res\drawable\app_icon.png
values\strings.xml
Src: () res\values\strings.xml
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Type drawable
drawable\app_icon.png
%|1354741607_5|%
Type values
values\strings.xml
%|121225748_7|%
Including resources from package: D:\InstallLocation\Android_SDK\platforms\android-23\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
%|291199635_8|%
(new resource id app_icon from drawable\app_icon.png #generated)
]
Here is screenshots of Assets/Plugins/Android directory

Here is screenshots of Android SDK Manager


I googled and got several answers like:
For those who are facing this problem, I solved it. You need to put the google_play_service_lib folder from the androidsdk\extra\google folder in plugins\android in order to make it work properly.
Or
Next, if you are planning on supporting Android, go to the menu option File > Chartboost - Android setup... and click the Setup button. This will link the Google Play Services library with your Unity project, which is required for using the Chartboost SD$$anonymous$$. This requires that the Google Play Services library is installed via the Android SD$$anonymous$$ $$anonymous$$anager. (See the Android Developer website for further instructions.)
Or
When I realized there were two of the same lib, I deleted the old. That still didn't fix it. I had to take the jar out of the lib folder and put directly int the Plugins/Android folder and that solved the issue for me.
So check them out too, maybe it will solve your problem!
Answer by liju · Jul 28, 2016 at 03:25 AM
I have got the solution . This may help who facing same problem
Right click on Assets > PlayServicesResolver folder and select Google Play Services > Resolve Client Jars to fix any dependency import issues.
Please refer this link
https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/game-engines/TpqvTLvtDEc
Answer by saadali211 · Oct 21, 2017 at 03:51 PM
Watch this video to fix problems its in hindi language thou.
Your answer
Follow this Question
Related Questions
CommandInvokationFailure: Unable to convert classes into dex format - Unity 1 Answer
Google Admob (V.6.1.2) crashing Android game on device built with Unity 2020.3.19 1 Answer
Failed to re-package resources Admob integration 0 Answers
Google AdMob Banner Ad shows on unity debug editor but does not show on android apk build. 0 Answers