AndroidStudio SDK directory does not exists

I am using Android Studio for a project on SVN (usually on Windows PCs).

Lately I want to run this on a Mac, it keep giving the below error:

  • PMD, checkstyle and findbugs android setup
  • How to start Activity from Android AppWidget?
  • NullPointerException : println needs a message in android
  • MediaMetadataCompat METADATA_KEY_ART only sets image the first time
  • How to use Accessibility Services for “Taking Action for Users”?
  • Eclipse Android Change API Level
  • Error:The SDK directory ‘/Users/AhmadMusa/Desktop/[PROJECT PATH]/D:\Android\sdk‘ does not exist.
    Please fix the ‘sdk.dir’ property in the local.properties file.

    I already put the SDK on local.properties file as:

    sdk.dir=/Users/AhmadMusa/Library/Android/sdk

    I don’t know why it keep adding the (D:\Android\sdk) automatically, this is my Windows PC SDK directory, but why it is here now! nothing on code mention any D:\Android\sdk.

    Related posts:

    How to check if bluetooth is enabled programmatically?
    Android app crashes with NullPointerException in ChoreoGrapher
    Retrieving data from database to listview failed
    How do I view Android application specific cache?
    Complex example of ListView getItemViewType()
    How can I find out which intent a service (not in my app) is started by?
  • Set maximum number of text lines for an EditText
  • Why is touchstart event after click?
  • Better way to determine if value exists in JSON feed
  • Set Limit on the DatePickerDialog in Android?
  • Dialog throwing "Unable to add window — token null is not for an application” with getApplication() as context
  • Jar files in libs folder are not used in Android Gradle build
  • 6 Solutions collect form web for “AndroidStudio SDK directory does not exists”

    You cannot edit local.properties it is a generated file, right click your project and select ‘Open Module Settings’ under SDK Location put your location for your SDK.

    paste in /Users/AhmadMusa/Library/Android/sdk

    Clean and rebuild your project

    Update

    Try to delete your local.properties file and create a new one, but do not check it into version control.

    Right click top level of project and Create new file ‘local.properties’
    then add: sdk.dir=/Users/AhmadMusa/Library/Android/sdk

    Clean and build

    From Android Studio 1.0.1

    Go to

    File -> project Structure into Project Structure
    Left -> SDK Location
    SDK location select Android SDK location (old version use Press +, add another sdk)
    Change the sdk path to /Users/AhmadMusa/Library/Android/sdk

    This is a problem when you open the project incorrectly. open the project do not import the project

    I think you should go to:

    File ->Project Structure->SDK Location->

    there select your sdk location.

    Checkout your SDK manager in Android studio, if you have partially installed sdk. Install SDK completely and try running your code.

    Just open your local.property file

    if your project is used in mac before, so the sdk path will be something like
    sdk.dir=/Users/siddharthyadav/Library/Android/

    Now if you are trying to use that in windows so just edit and put your sdk location:
    Example:
    sdk.dir=D:\software\android-sdk\android-sdk

    Just clean and build. See it works!!!

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.