Cannot resolve symbol SnackBar in Android


        Are you facing an error "Cannot resolve symbol SnackBar" while trying to design your first snackbar ? Lets see how to resolve it..

Now on the left side Expand Gradle Scripts and select build.gradle

Now, Goto File -Project Structure

Now click on the "+" icon at the top and add  library dependency.

Now select library and click OK. After adding the dependency this should get added to gradle script as shown below

Now go to your jave file and check, you should see something like the below. Press Alt + Enter, you can see the corresponding file will get imported.

No comments:
Write comments

Popular Posts