Gradle Install not valid Errors without information - c#

I'm currently wonking on my game with ads(UnityAds). During bulding I'm recieving these errors:
enter image description here
Before in the console I've got more errors excepting the pointed ones(I have a question).I resolved it by changing gradle version to 6.1.1 in Edit>Prefereces>External Tools, and it's worked and now I have only 2 errors which aren't telling me correct information. How can I get information about this to resolve it?
First error:
Exception: Gradle install not valid
Unity.Android.Gradle.AndroidGradle..ctor (System.String gradleLauncherPath, System.Int32 jvmHeapSize) (at <2a8f60cb57774be1835a1afee958dc72>:0)
UnityEditor.Android.GradleWrapper.CreateGradleInstance () (at <8b5e5c27dd23466cbbae54c94c729526>:0)
UnityEditor.Android.PostProcessAndroidPlayer.ExecuteWarmup (System.String stagingArea) (at <8b5e5c27dd23466cbbae54c94c729526>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <8b5e5c27dd23466cbbae54c94c729526>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <8b5e5c27dd23466cbbae54c94c729526>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <42a64fd733d9417da1ea3a757ad9a96d>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Second Error:
Build completed with a result of 'Failed' in 49 seconds (49332 ms)
0x00007ff6a9c198ad (Unity) StackWalker::GetCurrentCallstack
0x00007ff6a9c20469 (Unity) StackWalker::ShowCallstack
0x00007ff6aaba4883 (Unity) GetStacktrace
0x00007ff6ab24615d (Unity) DebugStringToFile
0x00007ff6a8d6f5c2 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000023838f3e453 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x0000023838f3e36b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x00000238104d6e10 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000002380cc1ba75 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x000002381311a30b (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
0x0000023813115fb3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x0000023838de6aa3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
0x0000023838dd3c13 (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x0000023838d7e743 (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
0x0000023589f2f85a (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
0x0000023589f2f673 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
0x0000023589f20afb (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
0x0000023589f058f7 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x0000023589f049bb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x0000023818c46acb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x0000023818c46933 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x0000023818c4647b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x0000023818c46333 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x0000023803c061bb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase)
0x0000023803bee5d8 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
0x0000023818c43813 (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000023803bec7de (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x0000023803bec2db (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000023803bf25db (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x0000023803bf0923 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x0000023803bf085b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
0x0000023803bec563 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000023803bebc13 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x0000023803beba8b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x0000023589eb0403 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x0000023804d8ff13 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x0000023804d8fccf (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x0000023804d8fbeb (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x0000023804d8fa3d (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x0000023804d8faf6 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ffb8a85feb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ffb8a79e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ffb8a79e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff6a9b3e274 (Unity) scripting_method_invoke
0x00007ff6a9b1db24 (Unity) ScriptingInvocation::Invoke
0x00007ff6a9b18735 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff6a9c6290a (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff6aa683f38 (Unity) GUIView::ProcessRetainedMode
0x00007ff6aabd5071 (Unity) GUIView::OnInputEvent
0x00007ff6aa683d4a (Unity) GUIView::ProcessInputEvent
0x00007ff6aabd5e8d (Unity) GUIView::ProcessEventMessages
0x00007ff6aabcfbd9 (Unity) GUIView::GUIViewWndProc
0x00007ffbfacde7e8 (USER32) CallWindowProcW
0x00007ffbfacde229 (USER32) DispatchMessageW
0x00007ff6aabaa8a3 (Unity) MainMessageLoop
0x00007ff6aabaf2eb (Unity) WinMain
0x00007ff6abf6484e (Unity) __scrt_common_main_seh
0x00007ffbfb3f7614 (KERNEL32) BaseThreadInitThunk
0x00007ffbfc0026a1 (ntdll) RtlUserThreadStart
I tried:
1.I'm using Unity 2021.3.18f1
2.I've tried to build project IL2CPP and Mono2x - Didn't worked
3.I'm changed API Compatibility level from .NET Standart 2.1 to .NET Framework: The second error set to (All that errors were redused to):
Build completed with a result of 'Failed' in 22 seconds (21570 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Related

I can't fix "BuildPlayerWindow+BuildMethodException: 3 errors"

I'm newbie to making my own games. months ago I created my first project. Once the build is complete, it builds normally.
But now, suddenly I can't build again because of this error
v
v
v
1
Internal build system error. BuildProgram exited with code -2146233088.
System.Exception: Failed to resolve target API for values
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.GetPathTargetAPI(NPath path)
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.EnumerateAPILevelResources(NPath srcAPKResources, NPath dstAPKResources, String resourceName)+MoveNext()
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.CopyIdsXML(NPath srcAPKResources)+MoveNext()
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupGradleResources()+MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupPlayerBuild()
at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram()
at PlayerBuildProgramTypeWrapper.Run(String[] args)
at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
2
BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <0d6ce211ebbc47e1a35a84c3672ff58f>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0d6ce211ebbc47e1a35a84c3672ff58f>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <5160fdea082d4c479eac116da4ffc2de>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <0d6ce211ebbc47e1a35a84c3672ff58f>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
3
Build completed with a result of 'Failed' in 41 seconds (40802 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
and this
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <0d6ce211ebbc47e1a35a84c3672ff58f>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <0d6ce211ebbc47e1a35a84c3672ff58f>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I've been looking for people with the same problem as me. I tried to follow But I can't solve this problem
I did before :
After I encountered a problem I have tried deleting and reinstalling Unity.
I have tried creating a new project. and copy some of the models.
I created an empty projectą¹ƒ
I tried installing another unity version.
But there is no way to solve this problem...

Unity FileNotFoundException "launcherTemplate.gradle" when building for Android

When using Unity 2021.3.6f1 I get a an error saying launcherTemplate.gradle file cannot be found. I don't see it referenced in the project anywhere.
I tried using a custom gradle file, modify existing gradle files but nothing has done the trick so far.
Image
FileNotFoundException: Failed to find $E:/Unity Game Engine/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\baseProjectTemplate.gradle
UnityEditor.Android.AndroidBuildPostprocessor.GetTemplate (System.String toolsPath, System.String fileName) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Android.AndroidBuildPostprocessor+<GetDataForBuildProgramFor>d__21.MoveNext () (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.Modules.BeeBuildPostprocessor.SetupBeeDriver (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0bc7e9c04c1540528b26863a0cb726ae>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
It looks like it's related to Unity Hub not installing Android build tooling properly.
From https://forum.unity.com/threads/cant-build-quest-game.1307529/
Unity Hub installer neglects to install the tools directory to this path:
c:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\Tools\
Copying over the directory from another recent Unity Editor installation will allow one to make Quest/Android builds again.

UnityStandaloneFileBrowser: ArgumentException Mono.WebBrowser is referenced by System.Windows.Forms

I imported the UnityStandaloneFileBrowser asset to a sample project to test it. Unfortunately I am not able to build the project for Windows.
I needed to set the Scripting Backend to IL2CPP and tried to use .NET Standard 2.0 and .NET 4.X, but both gave me these errors while trying to build:
1. ArgumentException
ArgumentException: The Assembly Mono.WebBrowser is referenced by System.Windows.Forms ('Assets/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <33fb8f3984d146e083d756d969c06738>:0)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <33fb8f3984d146e083d756d969c06738>:0)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at <33fb8f3984d146e083d756d969c06738>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
2. UnityEngine.GUIUtility:ProcessEvent
Build completed with a result of 'Failed' in 3 seconds (2740 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
3. UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <33fb8f3984d146e083d756d969c06738>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <33fb8f3984d146e083d756d969c06738>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Has anyone an idea, what I can do to fix this?
I contacted the asset developer a few times, but I don't get a response. So you are my last hope :-)

Xamarin Binding "Wrapper type '' is missing its native ObjectiveC Class

I am trying to bind an external accessory MSR SDK to Xamarin. Note, this is ON the device. It does not work in the simulator at all. I keep getting this error:
Wrapper type 'iMagProII.IMag' is missing its native ObjectiveC class 'IMag'.
Here is my .cs with my linker flags:
[assembly: LinkWith ("libiMagSDK.a", LinkTarget = LinkTarget.ArmV6 | LinkTarget.ArmV7 | LinkTarget.Simulator, SmartLink = true, ForceLoad = true, IsCxx = true, Frameworks = "CoreGraphics ExternalAccessory", LinkerFlags="-lsqlite3.0 -lc++")]
Here is the Stack Trace:
at MonoTouch.Registrar.DynamicRegistrar.OnRegisterType (MonoTouch.Registrar.ObjCType type) [0x00334] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.DynamicRegistrar.cs:573
at MonoTouch.Registrar.Registrar.RegisterTypeUnsafe (System.Type type, System.Collections.Generic.List`1& exceptions) [0x009a4] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.Registrar.cs:1027
at MonoTouch.Registrar.Registrar.RegisterType (System.Type type, System.Collections.Generic.List`1& exceptions) [0x00011] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.Registrar.cs:680
at MonoTouch.Registrar.DynamicRegistrar.Register (System.Type type) [0x00002] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.DynamicRegistrar.cs:839
at MonoTouch.ObjCRuntime.Class.Register (System.Type type) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/.pmcs-compat.Class.cs:126
at MonoTouch.ObjCRuntime.Class.GetHandle (System.Type type) [0x00000] in <filename unknown>:0
at MonoTouch.Foundation.NSObject.AllocIfNeeded () [0x00015] in /Developer/MonoTouch/Source/maccore/src/Foundation/.pmcs-compat.NSObject2.cs:390
at MonoTouch.Foundation.NSObject..ctor (MonoTouch.Foundation.NSObjectFlag x) [0x00006] in /Developer/MonoTouch/Source/maccore/src/Foundation/.pmcs-compat.NSObject2.cs:102
at iMagProII.IMag..ctor () [0x00000] in /Users//Projects/Xamarin/Bindings/Unimag/iMagProII/obj/Debug/ios/iMagProII/IMag.g.cs:112
at iMagProII.iOS.ImagViewController.ViewDidLoad () [0x0005c] in /Users//Projects/Xamarin/Bindings/Unimag/iMagProII.iOS/ImagViewController.cs:46
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)
at MonoTouch.UIKit.UIViewController.get_View () [0x00030] in /Developer/MonoTouch/Source/monotouch/src/build/compat/UIKit/.pmcs-compat.UIViewController.g.cs:2232
at iMagProII.iOS.ImagViewController..ctor () [0x00008] in /Users//Projects/Xamarin/Bindings/Unimag/iMagProII.iOS/ImagViewController.cs:23
at iMagProII.iOS.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00016] in /Users//Projects/Xamarin/Bindings/Unimag/iMagProII.iOS/AppDelegate.cs:33
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pmcs-compat.UIApplication.cs:38
at iMagProII.iOS.Application.Main (System.String[] args) [0x00008] in /Users//Projects/Xamarin/Bindings/Unimag/iMagProII.iOS/Main.cs:17
Any help on getting this library bound would be greatly appreciated. I have been banging my head at it for hours now.
This occurs when the class IMag can't be found in the final executable.
The most common reasons for this are:
A typo in the class name.
The native library does not include the architecture you're building for. For instance the native library needs to contain i386 code to run in the simulator. You can use the lipo tool to list the architectures in the native library:
$ lipo -info /path/to/libiMagSDK.a
You also need to know the architecture you're using for the app, you can check this in the project's iOS Build settings, on the Advanced page. Select one that the native library includes.
The native library in the binding project depends on another native library which is not in the binding project (and the IMag class is in that other library). All non-platform dependencies must be included.
The native library is incorrectly built, and doesn't include the class you're trying to bind (this is not frequent, but I've still seen it several times). You can use the nm tool to check what's included in a native library:
$ nm -arch armv7 /path/to/libiMagSDK.a | grep IMag
0x0000f00d S _OBJC_CLASS_$_IMag
[other results]
The above result would indicate that the class is included in the native library.

How to debug a Mono project that builds but can't run?

How do I debug a mono project? I can't seem to run it. It builds perfectly. But running it is another issue altogether.
This is the output from running it.
$ mono SvnTest.exe update
Stacktrace:
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.PtrToStringAnsi (intptr) <0x00045>
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.PtrToStringAnsi (intptr) <0x00045>
at PumaCode.SvnDotNet.AprSharp.AprString.ToString () <0x0004b>
at PumaCode.SvnDotNet.SubversionSharp.SvnException.ExtractMessage (PumaCode.SvnDotNet.SubversionSharp.SvnError) <0x00033>
at PumaCode.SvnDotNet.SubversionSharp.SvnException..ctor (PumaCode.SvnDotNet.SubversionSharp.SvnError) <0x0001b>
at PumaCode.SvnDotNet.SubversionSharp.SvnClient.Update (PumaCode.SvnDotNet.SubversionSharp.SvnPath,PumaCode.SvnDotNet.SubversionSharp.SvnOptRevision,bool,PumaCode.SvnDotNet.SubversionSharp.SvnClientContext,PumaCode.SvnDotNet.AprSharp.AprPool) <0x000e3>
at PumaCode.SvnDotNet.SubversionSharp.SvnClient.Update (string,PumaCode.SvnDotNet.SubversionSharp.SvnRevision,bool) <0x0009f>
at PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.UpdateCmd.Execute () <0x0015f>
at PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.CmdBase.Run (PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.Application/SubCommand,string[]) <0x00551>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int__this___object_object (object,intptr,intptr,intptr) <0x00060>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00057>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[],System.Exception&) <0x00057>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x001ab>
at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002d>
at PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.Application.Run (string[]) <0x0034b>
at PumaCode.SvnDotNet.SubversionSharp.SvnMockApp.Application.Main (string[]) <0x00037>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00054>
Native stacktrace:
mono() [0x48419c]
mono() [0x4ce1bf]
/lib/libpthread.so.0(+0xee80) [0x7f64b72b2e80]
/lib/libc.so.6(strlen+0x12) [0x7f64b6d477c2]
mono(mono_string_new+0x1d) [0x57f80d]
[0x4047e705]
Debug info from gdb:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Aborted
toString() method
public override string ToString()
{
if(IsNull)
return ("[apr_string:NULL]");
else
return (Marshal.PtrToStringAnsi(mString));
}
Clearly the mString member contains a garbage pointer. Judging from the call stack, you'll need help from the SubversionSharp team. Or find out somehow why it is trying to handle a Subversion error.
The last post at their web site dates from 2006, "We're not dead!". Their forum server looks pretty dead to me though. Good luck.

Categories

Resources