0

Due to disk space limits I moved my android SDK to a new drive/location. I can no longer clean the project as android studio fails to locate cmake because it's looking in the old directory.

I updated the sdk path and most things work, I can even build the project and external ndk files.

But build->clean Project in android studio 3.3.2 can't find cmake when trying to clean because it's looking in the old sdk directory for cmake.

I've completely reinstalled the sdk and android studio from scratch, but it still looks in the old directory on the wrong drive when trying to execute:

task ':app:externalNativeBuildCleanDebug'

Where is this compiler location setting or script or path? and how do I change it to look in the right directory?

Rot-man
  • 18,045
  • 12
  • 118
  • 124
svero
  • 1
  • https://stackoverflow.com/questions/16581752/android-studio-how-to-change-android-sdk-path – MD Naseem Ashraf Mar 23 '19 at 09:05
  • Thanks but the SDK path settings in android studio are already set correctly. Whatever the clean command is using, it is not using these paths from android studio's settings. They are all pointing to the correct location. They all point to drive E and the clean command always attempts to start cmake from drive c: -- It does however build the project correctly outside of the cleaning option. That is.. it can find cmake for regular compiling. Just not for clean or the clean fired off before rebuild. – svero Mar 23 '19 at 10:28

1 Answers1

0

I used a grep tool to look for the old directory. They were mostly contained in the .externalNativeBuild directory -- I tried deleting the directory and letting android studio rebuild it, and that managed to clear whatever temp files were holding onto the old sdk directory. It seems to work now.

svero
  • 1