0

I had a question before I edited this and it got answered*

-- I am having a problem where when I try to use a variable, it says 'Cannot find symbol variable music' (https://gyazo.com/7fc2b625fd9d83e76baaa9c3436ecde4) when I'm trying to build, I have tried adding it as a class but when I attempt that it says: Generated source files should not be edited.

I also attempted putting the class into a different file which I found, (Generated source files should not be edited?)

But that does not do any good either. (https://gyazo.com/2d94550dfe8f0a4c29a1b04cf10b3891) (https://gyazo.com/66f75d3f56ea0b464d2eacc669289ea9)

Any help?

  • Are you already perform gradle build? To ensure that the dependencies already installed on your project – Sukma Wardana Jul 27 '18 at 01:45
  • You need to put the `import android.view.View;` at the top of the file by the other `import` statements. – Will Richardson Jul 29 '18 at 23:53
  • Also if you're using Android Studio (or IntelliJ) you can put your cursor on the class name (eg `View`) and hit `Alt-Enter` and it will automatically import it for you. – Will Richardson Jul 29 '18 at 23:54
  • Okay I completely got that fixed now, thank you. Now I just need help with a different question, I will edit this main question to fix it, but, –  Jul 30 '18 at 00:13

0 Answers0