Ganesh
Ganesh

Reputation: 376

How to change the `temp` directory path of android `sdk`?

Since I reinstalled my OS, the path which android sdk points to became invalid. So, everytime I try to download or update something from sdk, it fails. I've searched many places for the solution but couldn't get a definite answer. for e.g.

    `C:\Users\GANESH~1\AppData\Local\Temp\PackageOperation40\android\repository\extras\intel\haxm-windows_r6_0_6.zip (The system cannot find the path specified)

the above path is invalid, as the username has changed since then. How to change it?

Upvotes: 3

Views: 4924

Answers (4)

Mujjamil Salmani
Mujjamil Salmani

Reputation: 1

Faced the same problem today. I solved it by renaming the path inside the file .installData located at "C:\Users\UserName\AppData\Local\Android\Sdk"

Upvotes: 0

Ganesh
Ganesh

Reputation: 376

I just realized that the question was still unanswered. I ended up copying my entire sdk to a different folder. & Every time I open my old projects, studio prompts me that path not found & asks me to direct it to new sdk. That eventually, also fixed the update issues I was facing

Upvotes: 0

xBlackCat
xBlackCat

Reputation: 91

As I found out recently, previous temporary folder destination is located in the .installer/.installData file.
The file will be generated in each component. So to change the temporary folder I have had to find every folder .install in SDK location and remove them all.

Upvotes: 4

StoneLam
StoneLam

Reputation: 400

Met the same issue today. My Android SDK was installed in D:\Android_dev\sdk\platforms when using Windows 7 then I re-install Windows 10 and change the username. When I want to install a new platform it prints "An error occurred while preparing SDK package Android SDK Platform 25: C:\Users\old_name \AppData\Local\Temp\PackageOperation01\platform-25_r03.zip". However it gets done when I install android-26 platform.

I resolve this by remove "D:\Android_dev\sdk\platforms\android-25". Some old download infomation might hides here.

Upvotes: 0

Related Questions