Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[UnityAds] After enabling Ads in the Services tab the project will not compile! Please help...

Discussion in 'Editor & General Support' started by Ferrety6012, Feb 14, 2016.

  1. Ferrety6012

    Ferrety6012

    Joined:
    Jun 27, 2014
    Posts:
    11
    I've been pulling my hair out for 2 days over this and I would really appreciate any help, google so far has not provided an answer.

    The problem is, if I either enable UnityAds using the Services tab (from Unity 5.2+) or even bypassing that and using the older UnityAds from the Asset Store I will be presented with the following error.

    FileNotFoundException: Could not find file "C:\Users\Josh\Google Drive\C#[APPNAME]\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:305) 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 (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 "C:\Users\Josh\Google Drive\C#[APPNAME]\Temp\StagingArea\AndroidManifest.xml".

    Other than UnityAds I use no other plugins and do not have an AndroidManifest.xml in my Assets folder. Adding one doesn't seem to help either and I still get the same error message, however disabling UnityAds DOES stop the error and lets it export fine.

    The Temp/StagingArea/ folder contains a AndroidManifest-main.xml and renaming it or adding an additional file doesn't help either as the folder is cleaned/rebuilt every time you build the apk.

    Has anyone got any ideas?

    Using the latest Android SDK (have tried a few) and Unity 5.3.2p3.
     
    AnryCZ likes this.
  2. dbsmaster

    dbsmaster

    Joined:
    Jun 29, 2016
    Posts:
    1
    I have the same problem , you can solve this? Thank you!