Cannot start sdk manager within IntelliJ IDE

Answered

My Android SDK Manager is working but I cannot get it to start from within the IntellijIDEA IDE community edition version 2016.1.2. Every time I click on Tools > Android > SDK Manager I get an error message as follows:
"Cannot run program "C:\MyAndroidSDKS\Android\android-sdk\tools\android.bat": CreateProcess error=2, The system cannot find the file specified". The reason why it does that is because it does not exist. I have my Android SDK in Program Files (x86)\Android\android-sdk and the android.bat file exists in the directory ...\Tools. If I click on the bat file the the SDK manager starts up and all good. So why does IntellijIDEA instists to open this android.bat file in the wrong directory? I have set all the SDK in the project to the correct path C:\MyAndroidSDKS\Android\android-sdk and it all compiles and works correctly. It seems to me that IntelliJIDAE does not care where I have set the SDK path when it comes to starting the SDK Manager from withing the environment.

How can I make IntelliJIDEA IDE understand where to find this android.bat file? I have tried everything and I have run out of options.

2 comments
Comment actions Permalink

Try to uninstall Android SDK and then install it again.

0
Comment actions Permalink

The directory is about 25 Gigabytes big, so this is a bit impractical. The SDK Directory is in C:\Program Files (x86)\Android\....When running the Emulator I get an error message about the space between the C:\Program Files<space>(x86). I solved the issue by moving the SDK into the Directory where IntellijIDEA wants it to be namely  C:\MyAndroidSDKS\Android\android-sdk. All I need to do is to change the settings in the project to this directory. Also I have no spaces in the new directory string. This seems to be the easier way of doing this.

0

Please sign in to leave a comment.