Reputation: 669
I am developing a flutter application and I am having certain errors. The flutter SDK location is rightly provided but it says that Flutter SDK not found.
The error is arising from the file build.gradle inside the android folder:
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
I am even trying to change it but it says that "Cannot resolve symbol 'GradleExecption'". I am also having the same error in the AndroidManifest.xml file where I am specifying the "android:icon: drawable/app_logo.png" but it says that "Cannot resolve symbol 'drawable'".
Can someone help me with this please?
Upvotes: 0
Views: 1712
Reputation: 7373
1 if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
cntrl+Alt+S then show settings window then search flutter you can see in under language and framework .Add flutter sdk path.
Here you verify the above path and restart the ide(Android Studio)
path :.android/local.properties
2 I am also having the same error in the AndroidManifest.xml file where I am specifying the "android:icon: drawable/app_logo.png" but it says that "Cannot resolve symbol 'drawable'".
check your path string add @withdrawable eg: android:icon="@drawable/app_logo.png"
Upvotes: 1
Reputation: 16
Maybe try running Flutter Doctor and see what it gives you, if that doesn't yield anything, then try checking if the PATH for Flutter is correct
Upvotes: 0