When i build the game unity says eror in console and then crashes, this all began when i tried to ad ads to the game, previuosly it built with no problem i have reinstalled different unity versions multiple times but the same error seems to occur:
THis is the same error i get Just before a Dilogue box This one--> Saying 1 exception was raised by workers:See the Console for details
`
`UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <434908727417408abd02bbd1a0835ef8>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <434908727417408abd02bbd1a0835ef8>:0
0x00007ff748d7826d (Unity) StackWalker::GetCurrentCallstack
0x00007ff748d7ee29 (Unity) StackWalker::ShowCallstack
0x00007ff749d02cc3 (Unity) GetStacktrace
0x00007ff74a3a3ebd (Unity) DebugStringToFile
0x00007ff747e3f392 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000024b0d4efae3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x0000024b0d4ef9fb (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x0000024b0d4ef740 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000024b35209005 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x0000024b3214e4cb (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
0x0000024b35093e23 (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
0x0000024b35083d43 (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
0x0000024b350739a3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
0x0000024b0c43f36a (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
0x0000024b0c43f183 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
0x0000024b0c430afb (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
0x0000024b0b95d697 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x0000024b0c42e1bb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x0000024b0d82a59b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
0x0000024b0d82a403 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
0x0000024b0d829f4b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
0x0000024b0d829e03 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
0x0000024ac551b21b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase)
0x0000024ac5502ae8 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
0x0000024b0d827273 (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000024ac5500cfe (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
0x0000024ac55007fb (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000024ac550725b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
0x0000024ac55056e3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
0x0000024ac550561b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
0x0000024ac5500a83 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
0x0000024ac5500133 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
0x00000248791bffcb (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
0x0000024ac42a0fa3 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x0000024ac42a0993 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x0000024ac42a074f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x0000024ac42a066b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x0000024ac42a04bd (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x0000024ac42a0576 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007fffdc77feb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007fffdc6be764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007fffdc6be8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff748c9cc34 (Unity) scripting_method_invoke
0x00007ff748c7c4d4 (Unity) ScriptingInvocation::Invoke
0x00007ff748c770e5 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff748dc12ca (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff7497e2b28 (Unity) GUIView::ProcessRetainedMode
0x00007ff749d334b1 (Unity) GUIView::OnInputEvent
0x00007ff7497e293a (Unity) GUIView::ProcessInputEvent
0x00007ff749d342cd (Unity) GUIView::ProcessEventMessages
0x00007ff749d2e019 (Unity) GUIView::GUIViewWndProc
0x00007ff84110e7e8 (USER32) CallWindowProcW
0x00007ff84110e229 (USER32) DispatchMessageW
0x00007ff749d08ce3 (Unity) MainMessageLoop
0x00007ff749d0d72b (Unity) WinMain
0x00007ff74b0c224e (Unity) __scrt_common_main_seh
0x00007ff8405c7614 (KERNEL32) BaseThreadInitThunk
0x00007ff8424226a1 (ntdll) RtlUserThreadStart`
`
I tried to build an android game with ads and it kept crashing
Related
I'm trying run PreEmptive.Protection.Dotfuscator.Pro[.Eval] -Version 6.0.1 in project Xamarin.Android that include Nuget to aid migration from Android Support to Android X:
<PackageReference Include="Xamarin.AndroidX.Migration">
<Version>1.0.4</Version>
</PackageReference>
but the result is this:
"/Droid/Droid.csproj" (default target) (6) ->
(_AndroidXCecilfy target) ->
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : Symbols were found but are not matching the assembly [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Mono.Cecil.ModuleDefinition.ReadSymbols (Mono.Cecil.Cil.ISymbolReader reader, System.Boolean throwIfSymbolsAreNotMaching) [0x0003c] in <1b16609822914d769fb771c1bb74cd3b>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Mono.Cecil.ModuleReader.ReadSymbols (Mono.Cecil.ModuleDefinition module, Mono.Cecil.ReaderParameters parameters) [0x00060] in <1b16609822914d769fb771c1bb74cd3b>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Mono.Cecil.ModuleReader.CreateModule (Mono.Cecil.PE.Image image, Mono.Cecil.ReaderParameters parameters) [0x00081] in <1b16609822914d769fb771c1bb74cd3b>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0000d] in <1b16609822914d769fb771c1bb74cd3b>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006c] in <1b16609822914d769fb771c1bb74cd3b>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <1b16609822914d769fb771c1bb74cd3b>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Xamarin.AndroidX.Migration.CecilMigrator.Migrate (System.String source, System.String destination) [0x001c2] in <865a8af74cb24987acc1eca3a5f0df36>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Xamarin.AndroidX.Migration.CecilMigrator.Migrate (System.Collections.Generic.IEnumerable1[T] assemblies) [0x00012] in <865a8af74cb24987acc1eca3a5f0df36>:0 [/Droid/Droid.csproj]
/.nuget/packages/xamarin.androidx.migration/1.0.4/buildTransitive/monoandroid90/Xamarin.AndroidX.Migration.targets(227,9): error : at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute () [0x000e3] in <770add7f13554ba8ad474c9c8fea5326>:0 [/Droid/Droid.csproj]
Information about the build agent OS:
=== Visual Studio Community 2019 for Mac ===
Version 8.5.4 (build 12)
Installation UUID: 097d734b-78c4-46b2-a654-ed5233f4a357
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.14.1.39 (d16-5 / 30e8706b4)
=== Mono Framework MDK ===
Runtime:
Mono 6.8.0.123 (2019-10/1d0d939dc30) (64-bit)
Package version: 608000123
=== .NET Core SDK ===
SDK: /usr/local/share/dotnet/sdk/3.1.200/Sdks
SDK Versions:
3.1.200
2.1.701
2.1.504
2.1.302
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/msbuild/Current/bin/Sdks
=== Xamarin.Android ===
Version: 10.0.6.2 (Visual Studio Community)
Commit: xamarin-android/d16-3/c407838
Android SDK: /Users/emegonza/Library/Android/sdk
Supported Android versions:
6.0 (API level 23)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.0
SDK Build Tools Version: 30.0.0 rc2
Build Information:
Mono: mono/mono/2019-06#476d72b9e32
Java.Interop: xamarin/java.interop/d16-3#5836f58
LibZipSharp: grendello/LibZipSharp/d16-3#71f4a94
LibZip: nih-at/libzip/rel-1-5-1#b95cf3fd
ProGuard: xamarin/proguard/master#905836d
SQLite: xamarin/sqlite/3.27.1#8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-3#cb41333
=== Operating System ===
Mac OS X 10.15.5
Darwin 19.5.0 Darwin Kernel Version 19.5.0
Tue May 26 20:41:44 PDT 2020
I run dotfuscator with this lines in the DotfuscatorConfig.xml, to see the error
<global>
<option>verbose</option>
</global>
Can you help me to find, why this problem happen and how to fix it?
I am trying to build a sample project which can be found at this link https://www.coursera.org/learn/xr-introduction/supplement/cARor/project-work-build-a-vr-application-to-your-device and I am getting this error:
Build completed with a result of 'Failed'
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
What to do?
Try to build in a different location? Preferably outside your project folder.
When I build or "build and run" the project I get three main errors. The project works because when I press play it does what it suppose to do in the game window. I'm trying to develop for the gearVr and Oculus which I selected in project settings.
I've looked at unity preferences made sure its using the correct SDK, JDK and NDK I even tried using the recommended settings but still couldn't upload anything to my device.
ERROR 1
CommandInvokationFailure: Gradle build failed. C:\Program
Files\Unity\Hub\Editor\2019.1.2f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe
-classpath "C:\Program Files\Unity\Hub\Editor\2019.1.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar"
org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m"
"assembleRelease"
stderr[
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':packageRelease'.
org.gradle.tooling.BuildException (no error message) ...
ERROR 2
Build completed with a result of 'Failed' 0x00007FF6E6F9104C (Unity)
StackWalker::GetCurrentCallstack 0x00007FF6E6F94501 (Unity)
StackWalker::ShowCallstack 0x00007FF6E56FDCC5 (Unity) GetStacktrace
0x00007FF6E79AF1D0 (Unity) DebugStringToFile 0x00007FF6E6FBFB49
(Unity) DebugLogHandler_CUSTOM_Internal_Log 0x00000200025704EB (Mono
JIT Code) (wrapper managed-to-native)
UnityEngine.DebugLogHandler:Internal_Log
(UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
...
ERROR 3
UnityEditor.BuildPlayerWindow+BuildMethodException: 53 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer
(UnityEditor.BuildPlayerOptions options) [0x00242] in
C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean
askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions)
[0x0007f] in
C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
0x00007FF6E6F9104C (Unity) StackWalker::GetCurrentCallstack
0x00007FF6E6F94501 (Unity) StackWalker::ShowCallstack
0x00007FF6E56FDCC5 (Unity) GetStacktrace 0x00007FF6E79AF1D0 (Unity)
DebugStringToFile 0x00007FF6E6FBFB49 (Unity)
DebugLogHandler_CUSTOM_Internal_Log 0x00000200025704EB (Mono JIT Code)
(wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log
(UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x00000200025703AB (Mono JIT Code) [DebugLogHandler.cs:10]
UnityEngine.DebugLogHandler:LogFormat
(UnityEngine.LogType,UnityEngine.Object,string,object[])
0x0000020002564691 (Mono JIT Code) [Logger.cs:61]
UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000002000257E7ED (Mono JIT Code) [Debug.bindings.cs:127]
UnityEngine.Debug:LogError (object) 0x0000020039D5E5E3 (Mono JIT
Code) [BuildPlayerWindowBuildMethods.cs:103]
UnityEditor.BuildPlayerWindow:CallBuildMethods
(bool,UnityEditor.BuildOptions) 0x0000020039D377FB (Mono JIT Code)
[BuildPlayerWindow.cs:908]
UnityEditor.BuildPlayerWindow:GUIBuildButtons
(UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
Normally the apk will be uploaded to my phone asking me to place the device into the GearVR.
There seems to be a problem with Gradle. As a workaround you could try to switch from "gradle" to "internal" in the Build Window.
I am having a lot of trouble using gdbserver and gdbserver64 on Android and the companion aarch64 gdb on my host. For example, I run into issues like this, where gdb is outputting what seems to be nonsense:
(gdb) target remote :5039
Remote debugging using :5039
warning: Could not load vsyscall page because no executable was specified
try using the "file" command first.
0x0000007fa7921d2c in ?? ()
(gdb) bt
Python Exception <type 'exceptions.ImportError'> No module named gdb.frames:
#0 0x0000007fa7921d2c in ?? ()
#1 0x0000000040000600 in ?? ()
Backtrace stopped: Cannot access memory at address 0x22eee199476794f4
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x0000007f87c249b4 in ?? ()
(gdb) x/4i $pc
=> 0x7f87c249b4: ldrb w8, [x0,#432]
0x7f87c249b8: cbz w8, 0x7f87c249ec
0x7f87c249bc: ldr x8, [x19,#3632]
0x7f87c249c0: ldr x9, [x8,#24]
(gdb) bt
Python Exception <type 'exceptions.ImportError'> No module named gdb.frames:
#0 0x0000007f87c249b4 in ?? ()
#1 0x0000007fa4b4fb25 in ?? ()
#2 0x0000000000000001 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) c
Continuing.
[New Thread 22374]
[New Thread 22375]
Program received signal SIGSEGV, Segmentation fault.
0x0000007f87c249b4 in ?? ()
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x0000007f87c249b4 in ?? ()
This is almost impossible to use, with everything being totally unhelpful. No symbols are loaded and no backtraces are even remotely reasonable. The app is also repeatedly signaled in places that it is not signaled at when being straced or traced using a static gdb (just to name one specific problem with it).
However, I was able to use a prebuilt armv7a statically linked gdb binary to debug some 32-bit applications in an Android emulator with relative ease. I ran the static gdb in a device shell without issue. I had no trouble loading symbols and had no odd signaling problems.
I couldn't find a statically linked aarch64 gdb binary anywhere, so I tried to build one inside my aarch64 chroot. I did manage to build gdb for aarch64, and I used these configure flags:
LDFLAGS="-static" ../configure --prefix=/noprefix --enable-static --disable-shared --disable-interprocess-agent --disable-libcc1
But it is dynamically linked, which is not what I wanted.
root#gram:/opt/gdb-aarch64/noprefix/bin# file gdb
gdb: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=f1a630e569467794c45b4389f510720c4342704b, not stripped
How do I build a statically linked linux aarch64 gdb?
When I try to build a .apk file it gives me the following 2 errors:
Error building Player: Win32Exception:
ApplicationName='C:/Users/Teodor/AppData/Local/Android/android-sdk/platforms/android-18\aapt.exe',
CommandLine='package -v -f -m -J gen -M AndroidManifest.xml -S "res"
-I "C:/Users/Teodor/AppData/Local/Android/android-sdk/platforms/android-18\android.jar"
-F bin/resources.ap_', CurrentDirectory='Temp/StagingArea' UnityEditor.HostView:OnGUI()
and
Exception: Error building Player: Win32Exception:
ApplicationName='C:/Users/Teodor/AppData/Local/Android/android-sdk/platforms/android-18\aapt.exe',
CommandLine='package -v -f -m -J gen -M AndroidManifest.xml -S "res"
-I "C:/Users/Teodor/AppData/Local/Android/android-sdk/platforms/android-18\android.jar"
-F bin/resources.ap_', CurrentDirectory='Temp/StagingArea' UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean
askForBuildLocation, BuildOptions forceOptions) (at
C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:367)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean
enableBuildButton, Boolean enableBuildAndRunButton, Boolean
canInstallInBuildFolder) (at
C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:972)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings () (at
C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:953)
UnityEditor.BuildPlayerWindow.OnGUI () (at
C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:726)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[]
parameters, System.Globalization.CultureInfo culture) Rethrow as
TargetInvocationException: Exception has been thrown by the target of
an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
System.Reflection.MethodBase.Invoke (System.Object obj,
System.Object[] parameters) UnityEditor.HostView.Invoke (System.String
methodName, System.Object obj) (at
C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:225)
UnityEditor.HostView.Invoke (System.String methodName) (at
C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:218)
UnityEditor.HostView.OnGUI () (at
C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:119)
and I dont know how to fix it.
In Unity 4.2.0 it doesn't give me any errors, but in 3.4.2 even if the project contains just the main camera and a cube it gives me these errors and the .apk file is not built. How can I resolve this?
Try to search the Android SDK directory for the file aapt.exe. In the later versions, it was moved to android-sdk/build-tools/18.0.0/. Look there and, if you find it, copy it from there to your android-sdk/platforms/android-18 folder.
I had an error very similar to this. What solved it for me was installing the Android SDK Build Tools using the Android SDK Manager.
There are some new Tools introduced in Android sdk -18 so the old unity version will not work
with new android tools as most of them are changed.