- Home /
Android + U3DXT: assembly stripping failed
I am using Unity 3.5.7f6 on Mac; lastest U3DXT. Build Android, code stripping enabled. When I am trying to build a project with U3DXT, I get following error:
UnityException: Failed assemblies stripper: /Applications/Unity3.5/Unity3.5.app/Contents/Frameworks/Mono/bin/mono "/Applications/Unity3.5/Unity3.5.app/Contents/Frameworks/Tools/UnusedBytecodeStripper/UnusedBytecodeStripper.exe" -l none -c link -a "Assembly-CSharp-firstpass.dll" -a "Assembly-CSharp.dll" -out output -x "/Applications/Unity3.5/Unity3.5.app/Contents/Frameworks/Tools/UnusedBytecodeStripper/link.xml" -d "Temp/StagingArea/Data/Managed" -x "/Users/user/Application/unity/Assets/link.xml" -x "tmplink.xml" current dir : Temp/StagingArea/Data/Managed
result file exists: False
stdout:
stderr: Unhandled Exception: Mono.Linker.ResolutionException: Can not resolve reference: UnityEngine.iPhoneGeneration UnityEngine.iPhone::get_generation() at
Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference, System.Object markedby) [0x00000] in <filename unknown>:0 at
Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction, Mono.Cecil.MethodDefinition markedby) [0x00000] in <filename unknown>:0 at
Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0 at
Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0 at
Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0 at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0 at
Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 at
Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 at
UnusedBytecodeStripper.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultingFile)
UnityEditor.MonoAssemblyStripping.MonoLink (BuildTarget buildTarget, System.String managedLibrariesDirectory, System.String[] input, System.String[] allAssemblies, UnityEditor.RuntimeClassRegistry usedClasses)
UnityEditor.HostView:OnGUI()
Removing U3DXT solves the problem. Disabling code stripping solves the problem, but any other stripping level still does not work. Also, I found another question with similar problem, but there is no answer still.
What should I do to fix this?
Answer by u3dxt · Apr 10, 2014 at 05:32 AM
Hi, since U3DXT currently only supports iOS, the workaround is like you said, to delete it when building for Android.
This is a very disappointing answer. We don't expect U3DXT to support anything except iOS, but we do expect it to not disturb builds for other platforms.
The essence of Unity3D is ability to build same project for variety of platforms and it would be rather troublesome to setup build scripts that would temporally delete all U3DXT libs for Andriid build and then return them back.
Could you please consider handling it on your side?
Hi, that is a reasonable argument. We will do something about it. But, we will likely just rename the files on our side when switching to Android or other platforms, and rename them back when switching to iOS.
Answer by chetanisinanand · Oct 16, 2014 at 07:25 PM
I encountered same issue and here I have Steps to resolve the issue while stripping is enabled and Building for Android Platform:
Delete entire U3DXT directory (inside Assets directory )
Make sure U3DXT classes/methods are not accessed/used anywhere inside project.
Delete the " link.xml " file under Asset directory (Most Important)
Build with stripping on unity Pro and this should do the trick :-)
Your answer

Follow this Question
Related Questions
Microphone in 3.5 beta 1 Answer
Help getting started with ActionScript 1 Answer
GameKit Authenticates but can't post scores to leaderboard 3 Answers