Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by iMancha · Oct 22, 2014 at 11:19 PM · androidadmob

issue when building player apk after adding google admob

Hi I really need help on this one, the error when building game:

Error: [Temp\StagingArea\AndroidManifest-main.xml:12, C:\Users\Marco\Documents\Unity Projects\Smash Run\Temp\StagingArea\android-libraries\GoogleMobileAdsPlugin\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/activity[@name=com.google.android.gms.ads.AdActivity] element:

UnityEditor.HostView:OnGUI()

AND:

Error building Player: CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. C:\NVPACK\jdk1.6.0_24\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/NVPACK/android-sdk-windows\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/UnityBeta/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -

stderr[ Error: [Temp\StagingArea\AndroidManifest-main.xml:12, C:\Users\Marco\Documents\Unity Projects\Smash Run\Temp\StagingArea\android-libraries\GoogleMobileAdsPlugin\AndroidManifest.xml:10] Trying to merge incompatible /manifest/application/activity[@name=com.google.android.gms.ads.AdActivity] element:


++ ++(end reached) ] stdout[ [Temp\StagingArea\AndroidManifest-main.xml:13, C:\Users\Marco\Documents\Unity Projects\Smash Run\Temp\StagingArea\android-libraries\GoogleMobileAdsPlugin\AndroidManifest.xml:8] Skipping identical /manifest/application/meta-data[@name=com.google.android.gms.version] element. [Temp\StagingArea\AndroidManifest-main.xml:13, C:\Users\Marco\Documents\Unity Projects\Smash Run\Temp\StagingArea\android-libraries\MainLibProj\AndroidManifest.xml:8] Skipping identical /manifest/application/meta-data[@name=com.google.android.gms.version] element. ]

I'm really lost and don't know what's going on?

When I locate the androidmanifest.xml file under

C:\Users\Marco\Documents\Unity Projects\Smash Run\Assets\Plugins\Android\GoogleMobileAdsPlugin

and rename it, then it builds fine, but no banner ads display in game.

If someone can explain to me what the error means to start off with and a possible solution would be a bonus.

This is my bread and butter here..........

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image robertbu · Oct 22, 2014 at 11:20 PM 0
Share

Hi moderators, please approve this or let me know if I haven't met the guidelines?

There are fewer moderators active in the last couple of months, and the ones active are taking more care before approving questions. It is not uncommon to wait several hours, and if posting at a quite time of day, I've seen wait times of up to 5 or 6 hours. The best solution in the short term is to become active on the list. When you have 15 karma points (which is a couple of thumbs up on comments or one accepted answer), your questions will no longer go through moderation.

avatar image iMancha · Oct 22, 2014 at 11:34 PM 0
Share

Thank you Robert, apologies for being hasty. I will keep that in $$anonymous$$d, and try to answer others questions to improve my karma.

seems like a good system, however for newbies it gets a little difficult.

once again, thank you for approving. I'm hoping someone can help me soon.

avatar image iMancha · Oct 23, 2014 at 01:00 AM 1
Share

Okay so I resolved this by removing the older plugin directory, as I added an older version of admob unity plugin first when watching an older tutorial.

However the ads still don't show in my game? my script below uses the Admob component script which has been assigned in the inspector. no errors now but still won't show ads on the main menu scene where this script is attached to an empty gameobject.

any ideas?

 using UnityEngine;
 using UnityEngine.UI;
 using System.Collections;
 [RequireComponent(typeof(Ad$$anonymous$$obPlugin))]
 public class ShowAds : $$anonymous$$onoBehaviour 
 {
     private const string AD_UNIT_ID = "ca-app-pub-4633443251598509/3727397274";
     private Ad$$anonymous$$obPlugin admob;
 
     //public bool hidden = true;
     
 
     void Awake()
     {
         //DontDestroyOnLoad(this);
 
     }
 
     // Use this for initialization
     void Start () 
     {
         admob = GetComponent<Ad$$anonymous$$obPlugin>();
         admob.CreateBanner(adUnitId: AD_UNIT_ID,
                            adSize: Ad$$anonymous$$obPlugin.AdSize.S$$anonymous$$ART_BANNER,
                            isTopPosition: true);
         admob.RequestAd();
         ShowTheAds();
     }
     
     // Update is called once per frame
     void ShowTheAds() 
     {
         admob.ShowBanner();
         //admob.HideBanner();
     }
 }
 

 

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Naamani · Aug 07, 2015 at 04:09 PM

For me, removing these lines:

 <activity android:name="com.google.android.gms.ads.AdActivity"
               android:label="@string/app_name"
  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
 
 </activity>
 

From the "Plugins/Android/AndroidManifest.xml" file did the trick.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by shelo941 · Apr 18, 2015 at 08:45 PM

Had same Error tried almost everything.When i got desperate,i deleted android manifest (Plugins/Android/AndroidManifest) . and problem was solved, than i copied manifest from temp (AndroidManifest,not AndroidManifest-main) and changed some values there wich i needed for other things.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Google Mobile Ads Interstitial ads is not showing in unity 2 Answers

GoogleMobileAds: As soon as I add my real banner ID, it stops working. 0 Answers

Andriod GoogleMobileAds not working in Real Device(Http respose code:400), 0 Answers

Unity Admob glitching game screen 1 Answer

App stops working as soon it starts. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges