Hi.
The error that I get is:
java.lang.NoClassDefFoundError: android.support.v4.util.SimpleArrayMap
You can find the full log in the attachment.
What I did:
- Downloaded GoogleMobileAdsPlugin
- Put it in Assets/Plugins/Android
- Copied google-play-service-lib to the same folder as above
- Copied AndroidManifest.xml from Unity folder (attached)
The code I used:
#if UNITY_ANDROID
string adUnitId = "ca-app-pub-my-id";
#elif UNITY_IPHONE
string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
#else
string adUnitId = "unexpected_platform";
#endif
// Create a 320x50 banner at the top of the screen.
BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Bottom);
AdRequest request = new AdRequest.Builder()
.AddTestDevice(AdRequest.TestDeviceSimulator) // Simulator.
.AddTestDevice("my device id")
.Build();
bannerView.LoadAd(request);
I've also tried exporting Unity project and setting everything up in Eclipse, along with GoogleMobileAdsPlugin and google-play-service-lib, adding support libraries, including them in build path, exporting in build path, adding android-support-v4.jar to projects, but nothing helped.
I would appreciate any ideas.
Thank you