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

Need help setting up Android SDK in Unity 2018.4

Discussion in 'Editor & General Support' started by Tyrannastrasz, Apr 4, 2020.

  1. Tyrannastrasz

    Tyrannastrasz

    Joined:
    May 8, 2017
    Posts:
    8
    Hello everyone who cared enough to read this,

    TL;DR - If you can, please tell me EXACTLY which SDK components I need to get in Android Studio and connect to my Unity 2018.4 so it doesn't raise any more errors when trying to build .apk;

    I'm struggling with an issue for almost a week now that apparently no amount of ferocious googling has been able to solve. I've already made a forum post about this and only one response which didn't really solve my problem even though I took the person's advice. I'm hoping the second time's the charm.

    Anywho, I've recently created a tiny, simple AR app that I wanted to export to Android. For whatever reason I never installed Android support on the previous build of Unity I had before last week (2017.x I believe it was). Either way, I had to update Unity, so I swapped between 2019 and back to 2018.4 which I'm currently on (after discovering 2019 doesn't support Vuforia yet).

    Now, here's the problem: I downloaded Java JDK8, Unity made no complaints. It requested I use Android NDK r16b, I found it in archived builds on google so again, no complaints by Unity. Now, when I got to installing SDK, all sorts of hell broke loose.
    Once Android Studio finished installing, downloaded the default SDK, I entered the SDK manager, downloaded the needed tools (build, platform, even the deprecated stuff that I found other people suggested); All's fine when I connect them to Unity in preferences > external tools; HOWEVER, once I go file > build settings, my Windows pops up with critical error saying it couldn't run adb.exe. Clicking OK basically doesn't do anything cause I keep getting spammed with that same error until I close the build settings menu.

    I've found that fiddling with the different versions of SDK tools (revisions of build tools, platform tools etc) stops that error spam when I get into build settings again, but trying to build the .apk file results in a failure (workers report 7 errors/complaints/whatever) and my build fails basically. Trying to go back into build settings results in getting the windows adb.exe error spam all over again.

    I'm at my wit's end here guys, been struggling to get this resolved for a week now and I'm running out of ideas... If you can suggest exactly which build/platform/sdk/ndk tools to download via android studio that would actually work with Unity 2018.4, or maybe even a completely different solution suggestion, I'm all for it. I would be deeply appreciative. Thank you!
     
  2. Tyrannastrasz

    Tyrannastrasz

    Joined:
    May 8, 2017
    Posts:
    8
    Never mind, solved it. For anyone struggling with a similar issue in the future, I'm posting a description of what I did in case it might help someone else.

    I downloaded a new adb zip file from google, extracted it into my platform-tools and Unity finally agreed to build my .apk file. :)