Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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.
     
    mfdemir, icyaway and AftimusPrime like this.
  3. TheEugeneL

    TheEugeneL

    Joined:
    Dec 7, 2017
    Posts:
    41
    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?
     
    Dioogo likes this.
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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:
    3
    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:
    12
    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. hansadler

    hansadler

    Joined:
    May 12, 2014
    Posts:
    50
    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:
    26
    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.
     
  14. nitroy2k

    nitroy2k

    Joined:
    Jun 27, 2013
    Posts:
    7
    Restarting unity did job for me. 2018.3.14f1
     
  15. Ehsan-Aziz

    Ehsan-Aziz

    Joined:
    Apr 25, 2017
    Posts:
    7
    Restart Unity Issue Resolve. :)
     
  16. Rak14967

    Rak14967

    Joined:
    Oct 27, 2018
    Posts:
    1
    Copy your sdk folder to another drive and give the new address to Unity and try again.
    My problem was solved this way
     
    araz01 likes this.
  17. ioanna316

    ioanna316

    Joined:
    Apr 14, 2014
    Posts:
    11
    still seeing this issue on 2018.4.10, restart helps only some times, usually just for 1 build attempt
     
  18. araz01

    araz01

    Joined:
    Aug 2, 2016
    Posts:
    53
    i Just Saw Comment Saying:
    Go to Android PlayerSettings Enable Auto Graphics API

    trying it right now, try it too!
     
    unity_65MDt-rr0h7oqQ likes this.
  19. araz01

    araz01

    Joined:
    Aug 2, 2016
    Posts:
    53
    or use linear with vulkan or other means, fixin it, its not always sdk, or jdk or ndk, could be just incorrect set up!
     
  20. araz01

    araz01

    Joined:
    Aug 2, 2016
    Posts:
    53
    Ok IT Was Set Up Here, Dont Overide And Use Default!
     

    Attached Files:

  21. araz01

    araz01

    Joined:
    Aug 2, 2016
    Posts:
    53
    sorry, my methods didnt work, it looked like it did i got excited... :( , something that should be enjoyable testing your work, is misery...
     
  22. araz01

    araz01

    Joined:
    Aug 2, 2016
    Posts:
    53
    Oh My Days... You just Need Gradle To be Set To Check In Unity Or HAve Actual Gradle Downloaded ANd used, dont let that be null,... useless as gradle
     
  23. Coimbra79

    Coimbra79

    Joined:
    Oct 26, 2015
    Posts:
    2
    very thanks araz01!!
    Finally your solution worked for me!
     
  24. ismaelmaciel

    ismaelmaciel

    Joined:
    Feb 24, 2019
    Posts:
    3
    Grrrrrrr :mad: :mad: :mad:

    my problem continues ...
    I just put the Facebook SDK and started these errors.
    Help Please... T.T
    ayuda my amigo...

    upload_2020-6-28_18-24-36.png
     
  25. gesselucio

    gesselucio

    Joined:
    Jul 1, 2016
    Posts:
    2
    upload_2020-12-19_11-30-48.png
    Marcar está opção para definir o caminho do Gradle resolveu para mim.
     
    EDevJogos likes this.
  26. gesselucio

    gesselucio

    Joined:
    Jul 1, 2016
    Posts:
    2
    upload_2020-12-19_11-32-28.png
    parece que ele não encontra o caminho do gradle
     
  27. unity_65MDt-rr0h7oqQ

    unity_65MDt-rr0h7oqQ

    Joined:
    Jan 17, 2021
    Posts:
    3
    i Just Saw Comment Saying:
    Go to Android PlayerSettings Enable Auto Graphics API
     
  28. unity_65MDt-rr0h7oqQ

    unity_65MDt-rr0h7oqQ

    Joined:
    Jan 17, 2021
    Posts:
    3
    Your project may not have been created correctly!
     
  29. unity_65MDt-rr0h7oqQ

    unity_65MDt-rr0h7oqQ

    Joined:
    Jan 17, 2021
    Posts:
    3
    By doing this, you can definitely get the right output. To get the output, you must have a good filter breaker and you definitely need a good internet connection
     
  30. lk16061993

    lk16061993

    Joined:
    Jul 22, 2020
    Posts:
    1
    I fixed please you guys just update the gradle path in preference .