I have completed a game and wanted to integrate ads on it. First I tried with google ads plugins. It showed no problem in the editor but when I tried to build it, it threw an error saying,
Error building Player: FileNotFoundException: Could not find file “D:\projects\c#\unity\Unity Ads test\Temp\StagingArea\AndroidManifest.xml”.
After trying multiple times and failing, I switched to unityads thinking it was a problem with the googleads plugins. The UnityAds were easy to integrate and they also ran fine in the editor but when I tried to build the apk again, it threw the same above mentioned error.
I have asked the solution of this problem in multiple place but all in vain. Its been more than a week. I have uninstalled and reinstalled Unity, Android Sdk and Jdk multiple times, so I am pretty sure these are not the problem. I described this problem to someone from Unity Technologies and he asked me to file a bug, which I did. Meanwhile I am curios (and also desperate) that if someone here has the solution to my problem. Or should I just wait for my bug report to be addressed? I don’t think this is a bug because I have not seen any posts anywhere describing this problem and is supposed to affect only me. The detailed console error is here
FileNotFoundException: Could not find file “D:\projects\c#\unity\Unity Ads test\Temp\StagingArea\AndroidManifest.xml”.
System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/FileStream.cs:354)
System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
(wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn)
Mono.Xml2.XmlTextReader.GetStreamFromUrl (System.String url, System.String& absoluteUriString)
Mono.Xml2.XmlTextReader…ctor (System.String url, System.Xml.XmlNameTable nt)
System.Xml.XmlTextReader…ctor (System.String url, System.Xml.XmlNameTable nt)
System.Xml.XmlTextReader…ctor (System.String url)
UnityEditor.AndroidXmlDocument…ctor (System.String path)
UnityEditor.AndroidManifest…ctor (System.String path)
UnityEditor.Android.PostProcessAndroidPlayer.PatchManifest (System.String manifest, System.String assetsData, Boolean developmentPlayer, Single progress_value)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.HostView:OnGUI()
Error building Player: FileNotFoundException: Could not find file “D:\projects\c#\unity\Unity Ads test\Temp\StagingArea\AndroidManifest.xml”.
Anyone who has gone through the same problem in the past?