0

I am trying to import a project. It gives an error for local.properties Please fix the 'sdk.dir' property in the local.properties file.

Found one similar question here, but no solutions worked.

Error is:

The SDK directory C:\MyProject\C:AndroidSdk does not exists

I edit local.properties and set sdk.dir=C\:\\AndroidSdk and hit Try again, but it is showing the same error and also removed slashes and saved C:AndroidSdk as property value in newly generated local.properties.

I am Working on windows, Android Studio version : 3.3.1

LaraFlow
  • 352
  • 5
  • 15

4 Answers4

1

When you import or try to open a dev to dev project, Android Studio try to sync the project SDK, showing a message informing a SDK error. Do not click on the OK button.

Just close the message and try to execute the project.

alxlives
  • 5,084
  • 4
  • 28
  • 50
  • 1
    Hello, welcome to stack overflow! Here, all the questions and answers need to be in english. If you want, you can use https://pt.stackoverflow.com/ , which is all in portuguese. – alxlives Sep 10 '19 at 14:26
  • @Donizete Gomes , what you want to say by "dev to dev project"? – LaraFlow Sep 11 '19 at 06:14
  • @alxlives , answer is now in english, you should remove downvote. – LaraFlow Sep 11 '19 at 06:15
1

Instead of importing the project, try to open it as an existing project, then you will get a prompt from the android studio that it didn't find the default path so it chose one specific to your computer

Elie M
  • 11
  • 1
0

Couldn't find what actual problem was. But upgrading Android Studio to 3.4 solved this problem.

LaraFlow
  • 352
  • 5
  • 15
0

If i delete the local.properties and rerun the build all works.

File --> Invalidate caches/restart

Keshav Gera
  • 10,807
  • 1
  • 75
  • 53