- Home /
Error when building for Android, SDK path is incorrect while it is.
Hi guys,
I am trying to build out a project to Android. I downloaded the SDK, downloaded the virtual devices from the SDK manager. Linked up the SDK to Unity and so the JDK.
The first time I pressed build, it built out and no problems happened. It was late, I closed the project and then today I tried to do a new build but got an error that the SDK path is incorrect and I should put the correct one.
I went to check the Preference > External Tools > Android SDK path and it is there... the correct one. Despite that, I copied and pasted the path into my Windows Explorer and it was there. I tried again. Same thing. Changed the path to something irrelevant and changed it back. Same thing.
I did a quick search over the internet and found out that the tools folder sometimes have a problem and I need to redownload it. Despite doing that already, I did it again. Same issue. Checked the SDK Manager that it has the target android versions, they are there.
I am currently at a loss and am not sure what to do. Anyone has any suggestions?
Thanks!
EDIT: Error screenshot: https://imgur.com/wPl08wB
SDK folder contents: https://imgur.com/r6Yqgkm
This might be due to file permissions in the sdk folder. Try starting Unity as ad$$anonymous$$ or delete the sdk folder and reinstall making sure sdkmanager is not elevated.
Tried running as ad$$anonymous$$, same problem. Copied the SD$$anonymous$$ folder out to a different location from AppData, didn't work. Worthy of note that it worked one day the next it didn't. Don't know what that is about.
I updated the post with a screenshot of the error and the folder list just in case something looks odd.