SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable flutter code example
Example 1: Flutter SDK not found. Define location with flutter.sdk in the local.properties file
export ANDROID_HOME=/home/user/Android/Sdk
Example 2: 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.