Understanding AdMob Implementation in Unity

Asked 2 years ago, Updated 2 years ago, 77 views

I am thinking of implementing AdMob using Unity 5.3.
It works well on iOS devices, but I get a compilation error on Android.

What I did was
(1) Obtain the unit ID for Android from the AdMob management screen and copy it to the source where you want to view the ad
(2) Import the AdMob Unity plug-in into a project
(3) Copy the Google-play-services_lib installed on the Android SDK to Assets/Plugins/Android/under

CommandInvocationFailure: Failed to re-package resources.See the Console for details.

I could find some questions and answers about similar errors, but I couldn't solve them (maybe because the information is out of date).

Is there anything else I need to do in order to implement AdMob on Android?
I would appreciate it if you could let me know.

Thank you for your cooperation.

unity3d admob

2022-09-30 19:38

1 Answers

Inside AdMobDependencies.cs in Assets\PlayServicesResolver\Editor

svcSupport.DependOn("com.android.support", "appcompat-v7", "23.1.0+";

where is described as

svcSupport.DependOn("com.android.support", "appcompat-v7", "LATEST";

I rewritten it and it worked for me.


2022-09-30 19:38

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.