Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 5.3 can`t merge manifiest whit Unity ads and google mobile ads plugin v2.3.1

Discussion in 'Unity Ads & User Acquisition' started by Tressor_Studio, Dec 22, 2015.

  1. Tressor_Studio

    Tressor_Studio

    Joined:
    May 28, 2013
    Posts:
    45
    I cant solve the problen follow all steps to implements the admob plugin . Please help ¡¡



    My manifiest :

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <!--
    3. This Google Mobile Ads plugin library manifest will get merged with your
    4. application's manifest, adding the necessary activity and permissions
    5. required for displaying ads.
    6. -->
    7. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    8.    package="com.google.unity"
    9.    android:versionName="1.0"
    10.    android:versionCode="1">
    11.  <uses-sdk android:minSdkVersion="9"
    12.      android:targetSdkVersion="19" />
    13.  <!-- Google Mobile Ads Permissions -->
    14.  <uses-permission android:name="android.permission.INTERNET"/>
    15.  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    16.  <!-- Uncomment to add billing for in-app purchase ads -->
    17.  <uses-permission android:name="com.android.vending.BILLING"/>
    18.  <application>
    19.    <!-- Denote the referenced Google Play services version -->
    20.    <meta-data android:name="com.google.android.gms.version"
    21.        android:value="@integer/google_play_services_version" />
    22.    <!-- Google Mobile Ads Activity -->
    23.    <activity android:name="com.google.android.gms.ads.AdActivity"
    24.        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
    25.    <!-- InAppPurchase Activity -->
    26.    <activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
    27.        android:theme="@style/Theme.IAPTheme"/>
    28.  </application>
    29. </manifest>

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <!-- Copyright (C) 2012 The Android Open Source Project
    3.  
    4.      Licensed under the Apache License, Version 2.0 (the "License");
    5.      you may not use this file except in compliance with the License.
    6.      You may obtain a copy of the License at
    7.  
    8.           http://www.apache.org/licenses/LICENSE-2.0
    9.  
    10.      Unless required by applicable law or agreed to in writing, software
    11.      distributed under the License is distributed on an "AS IS" BASIS,
    12.      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13.      See the License for the specific language governing permissions and
    14.      limitations under the License.
    15. -->
    16. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    17.           package="com.google.android.gms">
    18.     <uses-sdk android:minSdkVersion="9"/>
    19.  
    20.     <application>
    21.         <meta-data
    22.             android:name="com.google.android.gms.version"
    23.             android:value="@integer/google_play_services_version" />
    24.     </application>
    25.  
    26. </manifest>
    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <!-- This file was automatically generated by the Google Play Games plugin for Unity
    3.      Do not edit. -->
    4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    5.     package="com.google.example.games.mainlibproj"
    6.     android:versionCode="1"
    7.     android:versionName="1.0" >
    8.  
    9.     <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
    10.  
    11.     <!-- replaced during setup -->
    12.    
    13.  
    14.     <application>
    15.  
    16.      <!-- Required for Nearby Connections API -->
    17.         <meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
    18.             android:value="" />
    19.  
    20.         <!-- the space in these forces it to be interpreted as a string vs. int -->
    21.         <meta-data android:name="com.google.android.gms.games.APP_ID"
    22.             android:value="\ " />
    23.         <meta-data android:name="com.google.android.gms.appstate.APP_ID"
    24.             android:value="\ " />
    25.         <meta-data android:name="com.google.android.gms.version"
    26.             android:value="@integer/google_play_services_version" />
    27.  
    28.         <activity android:name="com.google.games.bridge.NativeBridgeActivity"
    29.             android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    30.     </application>
    31. </manifest>
     
  2. Tressor_Studio

    Tressor_Studio

    Joined:
    May 28, 2013
    Posts:
    45
    And the main manifest here (Copy and paste the manifiest from temp folder and added the (<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" ) for admob implementation .

    Code (CSharp):
    1. <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" android:versionCode="8" android:versionName="1.2" package="com.TreSSor.MinimalSnake">
    2.   <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true"/>
    3.   <application android:debuggable="true" android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
    4.     <activity android:label="@string/app_name" android:name="com.unity3d.player.UnityPlayerActivity">
    5.       <intent-filter>
    6.         <action android:name="android.intent.action.MAIN"/>
    7.         <category android:name="android.intent.category.LAUNCHER"/>
    8.       </intent-filter>
    9.       <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
    10.       <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    11.     </activity>
    12.     <!-- Google Mobile Ads Activity -->
    13.     <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.android.gms.ads.AdActivity"/>
    14.     <!-- InAppPurchase Activity -->
    15.     <activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity" android:theme="@style/Theme.IAPTheme"/>
    16.     <!-- Denote the referenced Google Play services version -->
    17.     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
    18.  
    19.         <activity android:name="com.google.games.bridge.NativeBridgeActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
    20.  
    21.      <!-- Required for Nearby Connections API -->
    22.         <meta-data android:name="com.google.android.gms.nearby.connection.SERVICE_ID" android:value=""/>
    23.  
    24.         <!-- the space in these forces it to be interpreted as a string vs. int -->
    25.         <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\ "/>
    26.         <meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="\ "/>
    27.         <activity android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:hardwareAccelerated="true" android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" xmlns:tools="http://schemas.android.com/tools" tools:ignore="UnusedAttribute"/>
    28.   </application>
    29.   <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23"/>
    30.   <!-- Google Mobile Ads Permissions -->
    31.   <uses-permission android:name="android.permission.INTERNET"/>
    32.   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    33.   <!-- Uncomment to add billing for in-app purchase ads -->
    34.   <uses-permission android:name="com.android.vending.BILLING"/>
    35. </manifest>
     
  3. Ardmark

    Ardmark

    Joined:
    Oct 24, 2012
    Posts:
    11
    In the file GoogleMobileAdsPlugin/AndroidManifest.xml, take out the line:
    Code (CSharp):
    1.     <activity android:name="com.google.android.gms.ads.AdActivity"  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
    Seems as though this gets added into the final manifest anyway. This fixed my problem, now the manifests merge.