LaraFlow
LaraFlow

Reputation: 392

Please fix the 'sdk.dir' property in the local.properties file. Studio removed slashes in path. Import project error. How to solve, debug?

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

Upvotes: 0

Views: 3359

Answers (4)

Elie M
Elie M

Reputation: 11

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

Upvotes: 1

Keshav Gera
Keshav Gera

Reputation: 11264

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

File --> Invalidate caches/restart

Upvotes: 1

Donizete Gomes
Donizete Gomes

Reputation: 11

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.

Upvotes: 1

LaraFlow
LaraFlow

Reputation: 392

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

Upvotes: 0

Related Questions