# Sdkmanager path not right

**URL:** <https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, UE4-27\
**Created:** [March 17, 2022, 8:18pm UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755 "2022-03-17T20:18:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 17, 2022, 8:18pm UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/1 "2022-03-17T20:18:35Z")

</div>

Hello. Hope your Android projects are fun and exciting. I on the other hand cannot get up and running. I followed the docs and installed Studio and the cmdline-tools and my Motorola USB drivers. adbdevice in cmd.exe shows me some number is connected.

Another example of, “it works once then never again”. I first installed Android Studio on my D: drive, which wasn’t recommended… but at least I received SUCCESS, SUCCESS, SUCCESS when running Engine/Extras/Android/SetupAndroid.bat

After SUCCESS I ran into a problem where “…32-bit or 64-bit… ndkroot… failed build”.

So I uninstalled Android Studio and installed to the recommended C:/Project Files.

But now… sdkmanager.bat file cannot be found in “C:\Users\thene\AppData\Local\Android\Sdk\cmdline-tools\latest\bin”… yet it is there.

“Unable to locate sdkmanager.bat”

Anyone know what could be going wrong?

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 18, 2022, 12:24am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/2 "2022-03-18T00:24:47Z")

</div>

Another problem I faced… - Term 4.5 in the Android SDK T&Cs talks about responsibility and losses. I’ve read many other T&Cs and still find this “threatening” talk that makes me feel I will lose out in a big way.

How many people use Windows 11, or have an Android phone with a Google account? There is also an “unfairness” term, which means companies can’t expect the world from you.

I just wonder… that’s all.

---

<div class="post-metadata">

**Author:** ![TrueFranco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/truefranco/32/1095055_2.png) [@TrueFranco](https://forums.unrealengine.com/u/TrueFranco)\
**Post date:** [March 19, 2022, 2:14pm UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/3 "2022-03-19T14:14:23Z")

</div>

Make sure your ANDROID\_HOME environment variable is pointing correctly to your android sdk folder.  
Before running SetupAndroid.bat delete the tools folder in your sdk installed directory ( the script will regenerate the folder again)  
Inside your sdk folder there is a build tools folder and inside that folder are the version you have installed. Go inside each of them and rename D8.bat to DX.bat, also rename D8.jar to DX.jar inside the lib folder.  
good luck

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 22, 2022, 1:26am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/4 "2022-03-22T01:26:50Z")

</div>

Hello. Do you mean every tools folder? build-tools, cmdline-tools and platform-tools?

---

<div class="post-metadata">

**Author:** ![TrueFranco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/truefranco/32/1095055_2.png) [@TrueFranco](https://forums.unrealengine.com/u/TrueFranco)\
**Post date:** [March 22, 2022, 3:07am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/5 "2022-03-22T03:07:05Z")

</div>

No, just inside build-tools, you will see folders named with numbers like 30.0.3 etc, inside each folder you will find D8.bat and lib/D8.jar. rename them to DX.bat and DX.jar.

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 22, 2022, 10:33pm UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/6 "2022-03-22T22:33:48Z")

</div>

If I delete the tools folder… how can I go in and change the filenames? 😃  
So delete the folder, run SetupAndroid.bat, then rename things?  
I’ve deleted build-tools, ran SetupAndroid.bat… and build-tools doesn’t show up again.

.bat file is looking for paths in certain places and even some version numbers are incorrect. I wonder where SetupAndroid got its information from?

Yes; my “Users/…/Sdk/ndk” folder is empty.

---

<div class="post-metadata">

**Author:** ![TrueFranco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/truefranco/32/1095055_2.png) [@TrueFranco](https://forums.unrealengine.com/u/TrueFranco)\
**Post date:** [March 23, 2022, 12:10am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/7 "2022-03-23T00:10:28Z")

</div>

I never said to delete “build-tools” folder, I said delete the “tools” folder, see the difference ?  
“C:\Users\<yourUsername\>\AppData\Local\Android\Sdk\tools” \<--------- tools

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 23, 2022, 1:38am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/8 "2022-03-23T01:38:42Z")

</div>

Sorry. There is no tools folder and the ndk folder is still empty. I uninstalled 4.27.2 and reinstalled but still having trouble finding sdkmanager.bat

 ![sdksdk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/7/4a715e345bb2566eeb528160a3e42abfca414312.png)

 ![sdksdk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/7/7572fa2324abb4b1f412a84c8dcd1aad5fcd325b.png)

 ![sdksdk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/2/df2f1d499e151ccac07877abaff86b361208016b.png)

And I renamed .jar and .bat files to DX but still a problem.

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 23, 2022, 2:15am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/9 "2022-03-23T02:15:35Z")

</div>

What I don’t get is this…

 ![sdksdk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/1/981fbbf784a233bae140c1936cd132449e691957.png)

the path is right there

---

<div class="post-metadata">

**Author:** ![TrueFranco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/truefranco/32/1095055_2.png) [@TrueFranco](https://forums.unrealengine.com/u/TrueFranco)\
**Post date:** [March 23, 2022, 2:28am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/10 "2022-03-23T02:28:14Z")

</div>

STUDIO\_SDK\_PATH is set to your ANDROID\_HOME environment variable. Your ANDROID\_HOME should looks like this, once you install android studio.

 ![android_home](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/3/da3789ace0f96803cb924101d33af76994fd8f88.jpeg)

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 23, 2022, 2:31am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/11 "2022-03-23T02:31:42Z")

</div>

Yes. The Environment Variable was correct.

I finally made a copy of SetupAndroid.bat and removed the error code "call “%SDKMANAGER%” " and replaced a direct link to sdkmanager.bat, and now the console downloaded all the appropriate files! 😃

Thanks for sticking with me True. I’m chuffed I know a little about .bat files.

I see now the NDKROOT variables

---

<div class="post-metadata">

**Author:** ![TrueFranco](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/truefranco/32/1095055_2.png) [@TrueFranco](https://forums.unrealengine.com/u/TrueFranco)\
**Post date:** [March 23, 2022, 2:33am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/12 "2022-03-23T02:33:32Z")

</div>

Glad you finally fix it 😃

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [March 23, 2022, 3:34am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/13 "2022-03-23T03:34:11Z")

</div>

Well renaming d8 to dx showed up later. The console threw up an error that said it missed dx.bat… so I see why you said rename the file. But I think this could be a danger. Now gradle is causing problems and compileDebugAidl. I have just installed versions 30 and 31 of the SDK in hopes this will sort it out. I wonder why you’d need to rename files in the first place? I could also hack away and only release a Release build. But you know… I’d like to sort it out.

And anyway… Having my game run on my phone is nice, but I should be learning Unreal. Not messing with my phone!

---

<div class="post-metadata">

**Author:** ![ue\_abyar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_abyar/32/473560_2.png) [@ue\_abyar](https://forums.unrealengine.com/u/ue_abyar)\
**Post date:** [April 15, 2022, 4:11am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/14 "2022-04-15T04:11:00Z")

</div>

I solved my problem by changing the "call “%SDKMANAGER%” " to direct link.  
thank you so much.

---

<div class="post-metadata">

**Author:** ![Aadeshrao](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aadeshrao/32/920716_2.png) [@Aadeshrao](https://forums.unrealengine.com/u/Aadeshrao)\
**Post date:** [June 23, 2022, 8:26am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/15 "2022-06-23T08:26:50Z")

</div>

![Screenshot 2022-06-23 135313](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/9/f698b9d792db3f6b5cfe7ffa6f3424e4f37a82d9.png)  
is this correct?

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [June 23, 2022, 8:53am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/16 "2022-06-23T08:53:54Z")

</div>

I don’t have UE4 installed this time, so I can’t see the folders. It would be advisable to create a copy of the file sdkmanager.bat - just in case you screw it up.

set SDKMANAGER=%STUDIO\_SDK\_PATH%/path/to/sdk/sdkmanager.bat

can be changed. “call” uses the SDKMANAGER path to launch the right build tools and extras with the batch file.

set SDKMANAGER = “C:/the/location/of/the.bat”

In Android Studio, in the managing tools options, delete all the build-tools apart from 28.0.3. Everything should be installed automatically then in the command prompt.

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [June 23, 2022, 8:56am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/17 "2022-06-23T08:56:34Z")

</div>

The % in %VARIABLE% is a special variable which changes the VARIABLE to a path to remember. So no use adding % in the " "s. This isn’t what we want.

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [June 23, 2022, 9:44am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/18 "2022-06-23T09:44:37Z")

</div>

Sorry I edited my post. Hopefully it’s more clearer. I’m not at my computer 🙂

---

<div class="post-metadata">

**Author:** ![anon19501049](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19501049](https://forums.unrealengine.com/u/anon19501049)\
**Post date:** [June 23, 2022, 9:52am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/19 "2022-06-23T09:52:35Z")

</div>

I would remove the %s from within the quotations and add C:/path to “set SDKMANAGER = /path/to.bat” then

call SDKMANAGER “parameter1” “parameter2”

But look at the original batch file for reference. I can’t remember the exact %, “” combination. May mean reinstalling UE4 so you can make a copy and call it “copyof\_sdkmanager.bat”

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [June 25, 2022, 2:28am UTC](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755/20 "2022-06-25T02:28:11Z")

</div>

Hi all,

There’s a lot of back-and-forth in this thread, so I just wanted to share my experience.

I was setting up android deployment on a new pc, the SetupAndroid.bat complained about not being able to find SDKMANAGER

I had to edit the .bat from

set SDKMANAGER=%STUDIO\_SDK\_PATH%\tools\bin\sdkmanager.bat

to

set SDKMANAGER=C:\Users\mywindowsusername\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat

[Cheers](https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Mobile/Android/Setup/AndroidStudio/)!

[Next page](https://forums.unrealengine.com/t/sdkmanager-path-not-right/507755.md?page=2)
