Googleads-mobile-unity: Build Error. AndroidManifest.xml is missing.

Created on 13 Nov 2020  路  2Comments  路  Source: googleads/googleads-mobile-unity

[REQUIRED] Step 1: Describe your environment

  • Unity version: 2019.4.14f
  • Google Mobile Ads Unity plugin version:5.4.0
  • Platform: Android (iOS, Android, Unity Editor)
  • Platform OS version: Mac OS 11.0.1
  • Any specific devices issue occurs on: Mac
  • Mediation ad networks used, and their versions: _____

[REQUIRED] Step 2: Describe the problem

When I build my project for android, An error has occurred.

StackTrace

BuildMethodException: [GoogleMobileAds] AndroidManifest.xml is missing. Try re-importing the plugin.
ManifestProcessor.StopBuildWithMessage (System.String message) (at Assets/GoogleMobileAds/Editor/ManifestProcessor.cs:175)
ManifestProcessor.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/GoogleMobileAds/Editor/ManifestProcessor.cs:52)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass15_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:411)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:391)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

Steps to reproduce:

/PATH/Assets/GoogleMobileAds/Editor/ManifestProcessor.cs

Before
string manifestPath = Path.Combine(Application.dataPath, Plugins/Android/GoogleMobileAdsPlugin.androidlib/AndroidManifest.xml");

After
string manifestPath = Path.Combine(Application.dataPath, Plugins/Android/GoogleMobileAdsPlugin/AndroidManifest.xml");

Relevant Code:

Most helpful comment

This happened because you upgraded from an old version of admob.
From the version 5.2.0 the folder structure was changed.

Plugins/Android/GoogleMobileAdsPlugin was changed to Plugins/Android/GoogleMobileAdsPlugin.androidlib
And the same with the manifest processor

This is not a bug. Is intended to make it work with unity newer versions like 2020.1

If you make a fresh install of the plugin it will work fine.

Please make a fresh install of the plugin

All 2 comments

This happened because you upgraded from an old version of admob.
From the version 5.2.0 the folder structure was changed.

Plugins/Android/GoogleMobileAdsPlugin was changed to Plugins/Android/GoogleMobileAdsPlugin.androidlib
And the same with the manifest processor

This is not a bug. Is intended to make it work with unity newer versions like 2020.1

If you make a fresh install of the plugin it will work fine.

Please make a fresh install of the plugin

Thanks @pipe-alt. Closing as a duplicate issue.

Was this page helpful?
0 / 5 - 0 ratings