Unity Failed to Build apk Android - c#

i followed the unity "tanks!" tutorial and now i'm trying to port the game on Android, it's my first time on Unity, now when it's going to build the APK unity tells me "Failed To Build APK" and then i get some errors, i'm attaching you the error i think it's fatal, please tell me what's wrong with it.
CommandInvokationFailure: Failed to build apk.
C:/Program Files/Java/jdk-9.0.1\bin\java.exe -Xmx2048M -D com.android.sdkmanager.toolsdir="C:/Android_SDK\tools" -D file.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar"-
stderr[
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at SDKMain.main(SDKMain.java:130)
Caused by: java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
at com.android.sdklib.internal.build.SignedJarBuilder.<init>(SignedJarBuilder.java:177)
at com.android.sdklib.build.ApkBuilder.init(ApkBuilder.java:446)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:422)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:362)
at UnityApkBuilder.<init>(UnityApkBuilder.java:214)
at UnityApkBuilder.main(UnityApkBuilder.java:34)
... 5 more
Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 11 more
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run(System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 emoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 emoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

If you execute jdeps on your application, you would be able to see that sun.misc.BASE64Encoder has been deprecated and can be replaced with java.util.Base64 which is there since JDK 1.8.
The migration guide reads this as well :
A few sun.* APIs have been removed in JDK 9. Notably,
sun.misc.BASE64Encoder and sun.misc.BASE64Decoder have been removed.
Instead, use the supported java.util.Base64 class, which was added in
Java SE 8.
In your case, since you rely on third parties(android sdktools) which themselves haven't resolved this. I'm afraid you might have to stick with 1.8 and in the meanwhile, this can be reported to their trackers once they plan to migrate their artifacts.
Of course, this also means you would have to at some point in time upgrade to using their Java 9 compatible version of the jar if and when they plan to release.
Update : This can be tracked on Unity#956425 for further updates.

Related

System.DllNotFoundException: libpcsclite.so.1 assembly:<unknown assembly> type:<unknown type> member:(null)

Researched this issue many times but didn't found solution of it. Working with xamarin forms version 5.0.0.2012, on win 10 os (saw many solutions for mac or linux but didn't found any for windows), using PCSC library version 5.0.0. Trying to invoke context.Establish method while debugging on Android 8.0:
public SimpleReader(ISCardContext context, bool releaseContextOnDispose = false)
{
if (context == null)
{
context = (ISCardContext) new SCardContext();
context.Establish(SCardScope.System);
releaseContextOnDispose = true;
}
this._context = context;
this._reader = (ISCardReader) new SCardReader(context);
this._releaseContextOnDispose = releaseContextOnDispose;
this._disconnectReaderOnDispose = true;
}
When, exception occur with message below:
System.DllNotFoundException: libpcsclite.so.1 assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) PCSC.Interop.Linux.LinuxNativeMethods.SCardEstablishContext(intptr,intptr,intptr,intptr&)
at PCSC.Interop.Linux.PCSCliteLinux.EstablishContext (PCSC.SCardScope dwScope, System.IntPtr pvReserved1, System.IntPtr pvReserved2, System.IntPtr& phContext) [0x00006] in C:\Users\danm\src\pcsc-sharp\src\PCSC\Interop\Linux\PCSCliteLinux.cs:39
at PCSC.SCardContext.Establish (PCSC.SCardScope scope) [0x00020] in C:\Users\danm\src\pcsc-sharp\src\PCSC\SCardContext.cs:81
at App1xx.Services.SimpleReader.SimpleReader..ctor (PCSC.ISCardContext context, System.Boolean releaseContextOnDispose) [0x00023] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Services\SimpleReaderLib\SimpleReader.cs:59
at App1xx.Services.SimpleReader.SimpleReader..ctor () [0x00000] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Services\SimpleReaderLib\SimpleReader.cs:70
at App1xx.Services.UaIdRLib.IdCardReader.connect () [0x00002] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Services\UaIdRLib\IdCardReader.cs:371
at App1xx.Views.AboutPage.OnButtonClicked (System.Object sender, System.EventArgs args) [0x0000f] in C:\Users\vzhynkin\source\repos\App1xx\App1xx\App1xx\Views\AboutPage.xaml.cs:22
at Xamarin.Forms.Button.Xamarin.Forms.Internals.IButtonElement.PropagateUpClicked () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Button.cs:187
at Xamarin.Forms.ButtonElement.ElementClicked (Xamarin.Forms.VisualElement visualElement, Xamarin.Forms.Internals.IButtonElement ButtonElementManager) [0x0001f] in D:\a\1\s\Xamarin.Forms.Core\ButtonElement.cs:61
at Xamarin.Forms.Button.SendClicked () [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Button.cs:173
at Xamarin.Forms.Platform.Android.ButtonElementManager.OnClick (Xamarin.Forms.VisualElement element, Xamarin.Forms.IButtonController buttonController, Android.Views.View v) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\ButtonElementManager.cs:25
at Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer.Android.Views.View.IOnClickListener.OnClick (Android.Views.View v) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\ButtonRenderer.cs:72
at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x00010] in /Users/builder/azdo/_work/278/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-30/mcw/Android.Views.View.cs:2252
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.68(intptr,intptr,intptr)
Does anyone faced with this issue?
The PCSC library does not appear to explicitly support Android. In my experience, nugets that work with Xamarin.Android have explicit dependencies set for the platform, but this one does not.
The library tries to use P/Invoke wrappers around native code. You can see that there are implementations for a number of operating systems here, but I don't see any references to Android. The stack trace shows that the code is deciding to use the Linux wrapper, which makes sense. It's looking for the libpcsclite.so.1 native "C/C++" library, but it's not finding it. That library has a home page that does not reference Android.
The PCSC nuget docs state:
pcsc-sharp does not contain any device drivers. A PC/SC compliant
reader + driver is mandatory.
That's the libpcsclite.so.1 . Either your Android device doesn't provide it, or if it does, it's not in a location that your Android app can find it. My Android device (running Android 9) does not have that library in any of /system/*lib* directories, which means that at least for my device someone would need to compile that native library for the CPU (usually arm64) for the device. If you can either compile the native code yourself or find someone who has, AND the native code supports the reader on your Android device, then you could get the whole thing to work.
I don't have any experience with PCSC myself - just some experience with Xamarin and native libraries.

Need help connecting to MongoDB cluster on Android

I'm working on a mobile app with Xamarin Forms and intend to use a Mongo database.
I'm using Visual Studio 2019 with the MongoDB Driver Version 2.9.2 and android 28 as target SDK version.
I created a cluster on MongoDB Atlas, whitelisted all IP addresses for now, and tried to connect the app to the cluster with the connection string I was provided for the cluster(in the code below I replaced the real username and password with placeholders).
Here's the code:
private const string CONNECTION_STRING = "mongodb+srv://username:password#cluster0-uswax.mongodb.net/test?retryWrites=true&w=majority";
var client = new MongoClient(CONNECTION_STRING);
If I run the program with the Android emulator, the line where the MongoClient is created is where the program crashes with the following exception:
System.AggregateException
Message=Error resolving name servers (Value cannot be null.
Parameter name: source) (Could not find file "/etc/resolv.conf")
Source=DnsClient
StackTrace:
at DnsClient.NameServer.ResolveNameServers (System.Boolean skipIPv6SiteLocal, System.Boolean fallbackToGooglePublicDns) [0x0005e] in <93b57b4b99c64a96a2c065ea9ae1fc1f>:0
at DnsClient.LookupClient..ctor () [0x00000] in <93b57b4b99c64a96a2c065ea9ae1fc1f>:0
at MongoDB.Driver.Core.Configuration.ConnectionString.Resolve (System.Boolean resolveHosts) [0x00011] in <bfbe70fcd6734952960e694cb03fd3c6>:0
at MongoDB.Driver.MongoUrl.Resolve (System.Boolean resolveHosts) [0x00015] in <f2c302ca191a4adf889da299a582e348>:0
at MongoDB.Driver.MongoClientSettings.FromUrl (MongoDB.Driver.MongoUrl url) [0x0001b] in <f2c302ca191a4adf889da299a582e348>:0
at MongoDB.Driver.MongoClientSettings.FromConnectionString (System.String connectionString) [0x00006] in <f2c302ca191a4adf889da299a582e348>:0
at MongoDB.Driver.MongoClient..ctor (System.String connectionString) [0x00000] in <f2c302ca191a4adf889da299a582e348>:0
at Socializer.Helpers.MongoCrud..ctor (System.String connectionString, System.String databaseName) [0x00008] in D:\Data\projects\xamarin\Socializer\Socializer\Socializer\Helpers\MongoCrud.cs:18
at Socializer.App..ctor () [0x0001b] in D:\Data\projects\xamarin\Socializer\Socializer\Socializer\App.xaml.cs:27
at Socializer.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x0002f] in D:\Data\projects\xamarin\Socializer\Socializer\Socializer.Android\MainActivity.cs:24
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in <11a340ccc8de43f09c97400139266ef5>:0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.8(intptr,intptr,intptr)
When I was looking for a solution to this problem I found this bug report,
stating that "Android is not currently a supported platform for the .NET driver"
Does that mean I cannot use MongoDB for Android applications or is there any other way? Thanks!
Edit: I also found this possible solution. The user that provided the answer states that "from Android 8 (Oreo), access to net.dns has been removed". Indeed when I remove android:targetSdkVersion="28" from my AndroidManifest.xml, the program no longer crashes, but that won't be an option once I want to upload the app to the play store.
The solution above is based on a custom implementation to get DNS servers but I do not know how I would implement this function into my code. I would appreciate it a lot if anyone could help me with that.
Here is the function:
public List<IPEndPoint> GetDnsServers()
{
var context = Android.App.Application.Context;
List<IPEndPoint> endPoints = new List<IPEndPoint>();
ConnectivityManager connectivityManager =
(ConnectivityManager)context.GetSystemService(MainActivity.ConnectivityService);
Network activeConnection = connectivityManager.ActiveNetwork;
var linkProperties = connectivityManager.GetLinkProperties(activeConnection);
foreach (InetAddress currentAddress in linkProperties.DnsServers)
{
IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse(currentAddress.HostAddress), 53);
endPoints.Add(endPoint);
}
return endPoints;
}
I got this issue too. It turns out that, MongoDB Driver on Xamarin Android doesn't support DNS Seedlist Connection Format (starts from "mongodb+srv://") very well. So you have to use Standard Connection String Format (starts from "mongodb://").
Please go to Atlas and find your Standard Connection String by selecting an old version driver like C#/.NET 2.4
For more discription of these two connection ways, refer to this

Failed to update Android SDK package list

Everytime I try to open the Player settings, it will show only blank. And the error below will be shown in the console.
I have tried to follow this link: https://answers.unity.com/questions/1320634/unable-to-list-target-platforms-when-i-try-to-buil.html
But still didn't work.
CommandInvokationFailure: Failed to update Android SDK package list.
/Applications/Unity/Hub/Editor/2019.2.0b1/PlaybackEngines/AndroidPlayer/SDK/tools/bin/sdkmanager --list
stderr[
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.SdkManagerCli.main(SdkManagerCli.java:103)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 4 more
]
stdout[
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.Android.SDKManager.UpdatePackagesList () (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.Android.SDKManager.HighestVersionInstalled (UnityEditor.Android.SDKManager+Component tool) (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.Android.AndroidPlatformIconProvider.GetCurrentSetAndroidSDKVersion () (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.Android.AndroidPlatformIconProvider.UpdateSDKVersion () (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.Android.AndroidPlatformIconProvider.get_targetSDKSupportsAdaptiveIcons () (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.Android.PlayerSettingsEditorExtension.IconSectionGUI () (at <4e05d4950c734693b0d63f05223d7a90>:0)
UnityEditor.PlayerSettingsEditor.IconSectionGUI (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.Modules.ISettingEditorExtension settingsExtension, System.Int32 sectionIndex) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/PlayerSettingsEditor/PlayerSettingsEditor.cs:803)
UnityEditor.PlayerSettingsEditor.OnInspectorGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/PlayerSettingsEditor/PlayerSettingsEditor.cs:573)
UnityEditor.AssetSettingsProvider.OnGUI (System.String searchContext) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Settings/Providers/AssetSettingsProvider.cs:94)
UnityEditor.SettingsWindow.DrawControls () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:322)
UnityEditor.SettingsWindow.DrawSettingsPanel () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Settings/SettingsWindow.cs:313)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at /Users/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Before, I can see some options so that I can try to build.
I was having this issue as well. Nothing worked until I did this:
Go Unity > Preferences, select External Tools, deselect everything
Close the Editor
Open the Editor, re-enable everything you deselected
Hit Play to force a refresh
Then build again and it'll work
I got the same error and fixed it in a different way.
Possible fix here Failed to update Android SDK Package List
I got the same error after importing the firebase SDK into Unity 2021.3.3f1. It turned out my system variable JAVA_HOME was not pointing to the Java used by Unity (which apparantly only caused a problem in combination with firebase).
To solve it I had to
change Windows 10 -> Settings -> System -> Edit System variables
Change the value of "JAVA_HOME" to my Unity Java version: "F:\Programs\Unity\2021.3.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK"
Reboot my Computer (for the JAVA_HOME change to take effect)
In Unity: Click on Assets -> External Dependency Manager -> Android -> Resolve
Not sure if the last step was necessary. I tried a lot of things (including "regenerating project files" - from Unitys settings)

How to change architecture of .ipa or .app from arm64 to i386 without source code

I'm writing mobile autotests using C#, Xamarin 6.1.3, iOS 10.2, iPhone 6s Plus, Xcode 8.2, OS X El Capitan 10.11.6.
I'm trying to launch tests on simulator using the following command:
IApp iApp = ConfigureApp.iOS.AppBundle(path_to_app/Application.app).StartApp();
I've got the following error:
Calabash.XDB.Core.Exceptions.DeviceAgentException : Failed to install app /Volumes/Win7 Ultim/Framework/new2/Payload/Atom.app
ExitCode: 5
-a,--app-bundle <path/to/app-bundle.app> Path .app bundle (for .ipas, unzip and look inside of 'Payload')
-c,--codesign-identity <codesign-identity> [OPTIONAL] Identity used to codesign app bundle [device only] DEFAULT=
-d,--device-id <device-identifier> iOS Simulator GUIDs
-u,--update-app <true-or-false> [OPTIONAL] When true, will reinstall the app if the device contains an older version than the bundle specified DEFAULT=1
install
Error installing org.gamatech.Movie-Friends to 9E44D0FE-A3F9-4FC1-8635- 20FB8AD20BA4: Error Domain=com.facebook.FBSimulatorControl Code=0 "Simulator does not support any of the architectures ([arm, arm64]) of the executable at /Volumes/Win7 Ultim/Framework/new2/Payload/Atom.app/Atom. Simulator Archs ([x86_64, i386])" UserInfo={NSLocalizedDescription=Simulator does not support any of the architectures ([arm, arm64]) of the executable at /Volumes/Win7 Ultim/Framework/new2/Payload/Atom.app/Atom. Simulator Archs ([x86_64, i386])}
false
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x0020a] in <e747267e258a4a668973c7ca7e9014a8>:0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient, Xamarin.UITest.Shared.Http.HttpClient xtcServicesClient, System.Boolean testCloudUseDeviceAgent) [0x0007a] in <e747267e258a4a668973c7ca7e9014a8>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00302] in <e747267e258a4a668973c7ca7e9014a8>:0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <e747267e258a4a668973c7ca7e9014a8>:0
at Xamarin.Application.Initialize () [0x00026] in /Volumes/Win7 Ultim/Framework/Xamarin/Application.cs:44
at Xamarin.Application..ctor () [0x00011] in /Volumes/Win7 Ultim/Framework/Xamarin/Application.cs:22
at Xamarin.Application.GetInstance () [0x0000c] in /Volumes/Win7 Ultim/Framework/Xamarin/Application.cs:62
at Xamarin.BaseTest.InitBeforeTest () [0x0000b] in /Volumes/Win7 Ultim/Framework/Xamarin/BaseTest.cs:18
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
Ios simulator supports only i386 architecture, as I know it cannot be changed.
Is it possible to change architecture of application, if I don't have source code, just .ipa and .app files?
It is not possible to change the supported architecture of an .ipa or an .app without the source code.

Error with Unity iOS compile: Cross Compilation job Mono.WebBrowser.dll failed

have been working on a project intended for iOS deployment. Until recently, we have been building and deploying to our client via webplayer. However, I am now attempting to shift to releasing builds on iOS . But, no matter what I try, when I go to compile the project I receive the following error messages:
Cross compilation job Mono.WebBrowser.dll failed.
UnityEngine.UnityException: Failed AOT cross compiler: /Applications/Unity_45/Unity.app/Contents/PlaybackEngines/iOSSupport/Tools/OSX/mono-xcompiler --aot=full,asmonly,nodebug,static,outfile="Mono.WebBrowser.dll.s" "Mono.WebBrowser.dll" current dir : /Users/admin/Desktop/UI_gg_current/Temp/StagingArea/Data/Managed
Env: Apple_PubSub_Socket_Render = '/tmp/launch-7SV8Ex/Render'
LOGNAME = 'admin'
PATH = '/usr/bin:/bin:/usr/sbin:/sbin'
TMPDIR = '/var/folders/7c/s32nkpmx0yvgw4mmw_5vhxx40000gn/T/'
MONO_PATH = '/Users/admin/Desktop/UI_gg_current/Temp/StagingArea/Data/Managed'
SSH_AUTH_SOCK = '/tmp/launch-wpdtRI/Listeners'
USER = 'admin'
GC_DONT_GC = 'yes please'
Apple_Ubiquity_Message = '/tmp/launch-cfnoHv/Apple_Ubiquity_Message'
SHELL = '/bin/bash'
__CF_USER_TEXT_ENCODING = '0x1F5:0:0'
GAC_PATH = '/Users/admin/Desktop/UI_gg_current/Temp/StagingArea/Data/Managed'
HOME = '/Users/admin'
COMMAND_MODE = 'unix2003'
result file exists: False. Timed out: False
stdout:
stderr:
at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultingFile) [0x00000] in <filename unknown>:0
at UnityEditor.MonoCrossCompile.CrossCompileAOT (BuildTarget target, System.String crossCompilerAbsolutePath, System.String assembliesAbsoluteDirectory, CrossCompileOptions crossCompileOptions, System.String input, System.String output, System.String additionalOptions) [0x00000] in <filename unknown>:0
at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in <filename unknown>:0
UnityEditor.HostView:OnGUI()
and
Error building Player: UnityException: Cross compilation failed.
I am using Unity 4.5. To date I have : deleted third party dlls (including xml.linq.dll) , removed any instance of Lambda search operators (=>), and deleted the temp folder because I have seen these approaches used in similar situations (I know some aspects of Linq are not supported in iOS cross compile).
I have looked at similar issues such as this one: http://answers.unity3d.com/questions/439367/cross-compilation-failed-csharpdll.html. But, I am so perplexed, because it isn't the CSharp assembly causing my problem (which means it isn't one of my scripts?) I am not sure why it would even be including a WebBrowser.dll for an iOS build. Any help is greatly appreciated, as I feel I have searched far and wide for a resolution with no luck.
See the resolution that for this question here.

Categories