Search Unity

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

Discussion in 'Editor & General Support' started by DavidKnightReddawn, Feb 5, 2019.

  1. DavidKnightReddawn

    DavidKnightReddawn

    Joined:
    Dec 17, 2018
    Posts:
    3


    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.
     
  2. spr1nc3

    spr1nc3

    Joined:
    Nov 11, 2018
    Posts:
    1
    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. TheEugeneL

    TheEugeneL

    Joined:
    Dec 7, 2017
    Posts:
    17
    I got this errors when forgot save one of my script after edit.
     
  4. JuanAlto

    JuanAlto

    Joined:
    Mar 13, 2019
    Posts:
    2
    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.
     
    chadq likes this.
  5. JuanAlto

    JuanAlto

    Joined:
    Mar 13, 2019
    Posts:
    2
    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?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,190
    Does this happen on a new/empty project? I can't really read the error in the photo, please use screenshots instead.
     
    chadq likes this.
  7. chadq

    chadq

    Joined:
    Dec 24, 2017
    Posts:
    2
    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):

    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:
    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!
     
    Last edited: May 24, 2019
  8. hyperbytestudios

    hyperbytestudios

    Joined:
    Jan 2, 2018
    Posts:
    9
    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.
     
    chadq likes this.
  9. hansg

    hansg

    Joined:
    May 12, 2014
    Posts:
    39
    I'm having this problem now too with Unity 2019.1.3f1
    Has anyone found a solution?
     
  10. unity_5YT_SzDtpVFRoQ

    unity_5YT_SzDtpVFRoQ

    Joined:
    Dec 24, 2018
    Posts:
    2
    restarting unity fixed the problem for me
     
  11. hexaust_

    hexaust_

    Joined:
    Mar 7, 2015
    Posts:
    23
    Having the same problem on Unity 2018.4.0f1
     
    TheSofaKing likes this.
  12. abdulahad7959

    abdulahad7959

    Joined:
    Apr 11, 2019
    Posts:
    1
    In my case i was updating some folders and got this error. Restarting unity helps me to fix this.
     
  13. dave_oak

    dave_oak

    Joined:
    Oct 7, 2015
    Posts:
    6
    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.