I am trying to place ad in my game. i am using unity 5. trying to place admob in my game. in unity editor it displaying dummy message. tried to build the game in android phone after build completed game opened in the phone. in console it displays an error message.Error Message.

i am new to this concept. anybody please help

  1. Downloaded the plugin from admob website
  2. In SDK manager google repository, Google Play Service and Google Play Billing Library was installed
  3. AndroidMainfest.xml file is copied in the asset.


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<!-- Google Mobile Ads Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Uncomment to add billing for in-app purchase ads -->
<uses-permission android:name="com.android.vending.BILLING" /> 
android:label="@string/app_name" >
   <activity android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="fullSensor" android:name="com.unity3d.player.UnityPlayerNativeActivity">
     <action android:name="android.intent.action.MAIN" />
     <category android:name="android.intent.category.LAUNCHER" />
   <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<!-- AdMob Plugin -->
    <activity android:name="com.google.ads.AdActivity"


In main Script i used

using GoogleMobileAds.Api;

public class GameScript : MonoBehaviour {
private BannerView bannerView;

Void Start(){
RequestBanner ();

private void RequestBanner()
    string adUnitId = "unity test id";
    #elif UNITY_IPHONE
    string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
    string adUnitId = "unexpected_platform";

    // Create a 320x50 banner at the top of the screen.
    bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
    // Create an empty ad request.
    AdRequest request = new AdRequest.Builder().Build();
    // Load the banner with the request.

1 Answer 1


I solved the problem. i removed all playstore plugin from my project, then i select Edit -> Reimport all. then I import admob plugin. them in AndroidMainfest.xml i changed "android:value="true" to android:value="false" ".

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
  <action android:name="android.intent.action.MAIN" />
  <category android:name="android.intent.category.LAUNCHER" />
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik"
    android:value="false" />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .