flutter error SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. code example
Example: sdk location not found. define location with an android_sdk_root environment variable
I know this answer is late, but I hope it helps others.
The answer is simple. You have to just copy your local.properties file to the folder where project is stored and it will work like charm. But remember, it must be placed in the root folder where the project is stored.