Error When try to build an simple menu for Android

Hello , i have a error when i try to build my first test game .

ArgumentNullException: Value cannot be null. Parameter name: path1 Build completed with a result of ‘Failed’ UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179) UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

@robisoftware

You should familiarize yourself with how to ask proper questions, you just basically say that you have some problem with some kind of menu, without any details, and then you just throw some screen cap and badly formatted error message here for forum readers to decipher…

So did you use IMGUI for actual runtime UI… or what?

You see - you didn’t actually explain what is going on, and what have you done…

https://forum.unity.com/threads/unity-community-code-of-conduct.743888/

@eses , i’m sorry for that . i should post more details about my project .
So my menu look like that , i create buttons using DoozyUI: Complete UI Management System | GUI Tools | Unity Asset Store . On play mode i don’t have any errors , all things work . The error came when i try to build for android .
I have instaled already jdk 8 , and last version of sdk . For that swipe menu with car i used a prefab that store images .

If you are using doozy ui, maybe you should ask somewhere where they give support to their product? I am not saying that your problem is related to doozy, as I have no idea about that… but maybe some doozy user knows about this same issue.

@eses
I ask doozy ui staff , and they say this error is not related to doozy. On a simple search on google i found that i m not the only one with this problem .

Here is what I have tried: Restart Unity, Reinstall Unity, Update Android SDK/Android Studio, Update JDK, Change Target API

hard work pays off , after a couple of hours i finaly did it , thanks a lot … This is fun :))

how did you fix it ?

NullReference actually does not require a forum post, and it NEVER requires a forum NECRO post of an old thread!!

The answer is always the same… ALWAYS. It is the single most common error ever.

Don’t waste your life spinning around and round on this error. Instead, learn how to fix it fast… it’s EASY!!

Some notes on how to fix a NullReferenceException error in Unity3D

  • also known as: Unassigned Reference Exception
  • also known as: Missing Reference Exception
  • also known as: Object reference not set to an instance of an object

http://plbm.com/?p=221

The basic steps outlined above are:

  • Identify what is null
  • Identify why it is null
  • Fix that.

Expect to see this error a LOT. It’s easily the most common thing to do when working. Learn how to fix it rapidly. It’s easy. See the above link for more tips.

You need to figure out HOW that variable is supposed to get its initial value. There are many ways in Unity. In order of likelihood, it might be ONE of the following:

  • drag it in using the inspector
  • code inside this script initializes it
  • some OTHER external code initializes it
  • ? something else?

This is the kind of mindset and thinking process you need to bring to this problem:

https://forum.unity.com/threads/why-do-my-music-ignore-the-sliders.993849/#post-6453695

Step by step, break it down, find the problem.

Here is a clean analogy of the actual underlying problem of a null reference exception:

https://forum.unity.com/threads/nullreferenceexception-object-reference-not-set-to-an-instance-of-an-object.1108865/#post-7137032