Unity Android Build Error. Please Help!!! So Confused

Hi guys!

I’m trying to do an Android Build and I keep getting these Errors stopping me. I’ve looked high and low on the net but can’t find anything related specifically to this error.

Errors: Build Completed with result of Failed.

  1. ArgumentNullException: Value cannot be null. Parameter Name: path1

  2. Error Building Player: ArgumentNullException: Value cannot be null. Parameter Name: path1

My PC’s State:

  • Recently reset PC to factory settings
  • Reinstalled latest Unity.
  • Android Studio install and updated with all the elements, Google Play services, SDK, etc…
  • SDK Path set in External tools
  • Java jdk and jre installed
  • JAVA_HOME set in PC settings. and %JAVA_HOME added to path
  • Windows dev kit installed (This was one of the solutions I found but also did not help me)

Any help would be amazing! Hoping someone has also had this issue before.

I just had this randomly happen to me when switching the scripting backend and building for Android. Restarting Unity seems to have fixed it.

3 Likes

I got this errors when forgot save one of my script after edit.

We are having this same issue, Do you found a solution for this @DavidKnightReddawn ?
We have tried:

  • Restarting Unity.
  • Reinstall Unity
  • Reimporting all assets.
  • Swith platforms.
  • Update Android SDK.
  • Downgrading SDK and JDK

But nothing seems to work.

Enviroment
Unity 2018.3.14f
JDK 1.8.0_152
Android Studio with lates SDK updates.

1 Like

Hello, We also tested building the project with Unity 2019.1.2f and we are having the same problem, Does anyone has had some progress with this issue?

1 Like

Does this happen on a new/empty project? I can’t really read the error in the photo, please use screenshots instead.

1 Like

Hello, @JeffDUnity3D ! This problem does not happen in a new project. I did notice a precursor error that I didn’t notice before when seeing the above error (since I had Clear on Build set):

4537384--420568--android_build_error_precursor.png

And after hitting Build, it will cause the aforementioned error, likely as a result of not resolving the tools path:
4537384--420505--android_build_error.png

In both the new empty Android project and our other project, the settings are configured to use the embedded JDK and Android SDK. And the environment variables are the same since its the same machine. So I’m not sure what might be differing from the two projects. Any ideas?

Thank you!

So i had a project running with unity 2018.2 and everything was working nice. This same issue started for me after switching to unity 2018.3.5

I can’t do anything really about this issue, and its clearly looks like something wrong with unity version.

1 Like

I’m having this problem now too with Unity 2019.1.3f1
Has anyone found a solution?

restarting unity fixed the problem for me

Having the same problem on Unity 2018.4.0f1

1 Like

In my case i was updating some folders and got this error. Restarting unity helps me to fix this.

Happened to me when attempting to build an app bundle for Google Play. Switch back to apk build didn’t resolve it. Restarting Unity (which invoked the android dependency resolver) did fix it.

Unity 2019.1.11f with Unity hub.

Restarting unity did job for me. 2018.3.14f1

Restart Unity Issue Resolve. :slight_smile:

Copy your sdk folder to another drive and give the new address to Unity and try again.
My problem was solved this way

1 Like

still seeing this issue on 2018.4.10, restart helps only some times, usually just for 1 build attempt

i Just Saw Comment Saying:
Go to Android PlayerSettings Enable Auto Graphics API

trying it right now, try it too!

1 Like

or use linear with vulkan or other means, fixin it, its not always sdk, or jdk or ndk, could be just incorrect set up!

Ok IT Was Set Up Here, Dont Overide And Use Default!