If Android Studio notices a difference in the path to the android SDK folder on disk and the path mentioned in your local.properties file, it will prompt and upon confirmation update the path in local.properties
. I think you local.properties file is not retaining the change in SDK path once you close the project. Check you check if something is reverting the changes.
Also, try saving the local.properties file manually after updating the sdk.dir property with correct path..
It looks like this in the local.properties
file.
# change the SDK path below to match the folder on your system
sdk.dir=D\:\\Android\\android-sdk