liortal
September 18, 2017, 6:04am
1
We are trying to upgrade to Unity 2017.1; the build (Android) works locally, but in the cloud fails.
I was able to see this exception in the log. Is this a known bug with UCB at the moment ?
55420: [Unity] XmlException: ‘tools’ is undeclared namespace. file:///BUILD_PATH/moonactive.coin-master.android-2017-1-arm/Temp/StagingArea/AndroidManifest.xml Line 217, position 46.
55421: [Unity] at Mono.Xml2.XmlTextReader.ReadStartTag () [0x00000] in :0
55422: [Unity] at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in :0
55423: [Unity] at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in :0
55424: [Unity] at Mono.Xml2.XmlTextReader.Read () [0x00000] in :0
55425: [Unity] at System.Xml.XmlTextReader.Read () [0x00000] in :0
55426: [Unity] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in :0
55427: [Unity] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in :0
55428: [Unity] at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in :0
55429: [Unity] at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in :0
55430: [Unity] at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in :0
55431: [Unity] at UnityEditor.AndroidXmlDocument…ctor (System.String path) [0x00000] in :0
55432: [Unity] at UnityEditor.AndroidManifest…ctor (System.String path) [0x00000] in :0
55433: [Unity] at UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.PatchManifest (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String manifest) [0x00000] in :0
55434: [Unity] at UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x00000] in :0
55435: [Unity] at UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x00000] in :0
55436: [Unity] at 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.BuildReporting.BuildReport report) [0x00000] in :0
55437: [Unity] at UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args) [0x00000] in :0
55438: [Unity] UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[ ], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
55439: [Unity] UnityEditor.CloudBuild.Builder:Build()
dannyd
September 18, 2017, 2:59pm
2
I think this should be fixed in latest patch releases of 2017.1. Which version are you building against?
liortal
September 18, 2017, 6:52pm
3
I am using 2017.1.1, i will have a look at the patch releases
liortal
September 18, 2017, 7:59pm
4
can’t find any fix listed for this under patch releases…
dannyd
September 19, 2017, 7:35pm
5
It was specific to versions of the Android SDK Tools above 26.0 - I’m assuming you’re on an older version locally? There was also a discussion and some workarounds mentioned here: Sudden error Unable to merge android manifests. - Unity Services - Unity Discussions
liortal
September 20, 2017, 4:23am
6
The error I am having is not related to manifest merging though. Are you sure its the same thing?
I probably don’t have Android Tools 26.0 locally.
Since Android SDK 26, If any manifest file in your project does not explicitly declare the tools namespace then this occurs.
Check each of your plugins for manifest files and add the below line:
xmlns:tools=“http://schemas.android.com/tools ”
Hope that helps!
2 Likes
liortal
September 27, 2017, 11:08am
8
@ollieblanks thanks for the workaround. it’s a bit of a hassle to tell you the truth.
Are there any plans to let me select which Android tools should be used? i believe that most projects are going to be broken by this… what’s the rationale of having it in the cloud build environment ?
Is there any plan to make this work? our project is fairly large, with many 3rd party plugins.
Some of the plugins come as an .aar file. I wouldn’t want to start unpacking all of them to modify their manifests. There should be an easier solution.
One of the main reasons we upgraded to 2017.1 was the ability to build in the cloud (we couldn’t previously, since we couldn’t define a custom Proguard file). Now this issue is preventing us from building in the cloud again.
liortal
October 11, 2017, 10:19am
10
@dannyd is there any option to allow us (users of UCB) to select the version of android tools to use when building?
dannyd
October 12, 2017, 7:08pm
11
Not currently planned. You could try requesting a specific buildToolsVersion in your gradle template (although I haven’t tested this).
liortal
October 13, 2017, 4:30am
12
does the cloud VM have different tools versions installed locally ? or only the latest one ?
dannyd
October 13, 2017, 4:11pm
13
Should have the build tools installed back at least a few major versions.