Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please take a look at my version of this app? - error: cannot find symbol fab = findViewById(R.id.fab); #1

Open
Cloufish opened this issue Jun 10, 2021 · 1 comment

Comments

@Cloufish
Copy link

Cloufish commented Jun 10, 2021

https://github.com/Cloufish/LearningProjects/tree/master/Android_Apps/ToDoList

It seems like I've got an error

error: cannot find symbol
        fab = findViewById(R.id.fab);

And I think that I've declared it correctly by:

private FloatingActionButton fab;

before findViewById method.
I'm a beginner in programming, could you give me a hint on how to solve this issue?

@b-willii
Copy link

b-willii commented Jul 29, 2022

You have to assign the floating action button an id so: "android/id/"fab"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants