Jump to content
  • Advertisement
Sign in to follow this  
Beastinlosers

Cannot Find Symbols

This topic is 768 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to follow this android tutorial for developing a flashlight.

 

Here is my code: http://pastebin.com/0D29gFin <--Line 31 is the problem

 

Here is were my messages/logs/output/error stuff: http://pastebin.com/p4TtdvMH <-- Line 47 problem

 

Here is the tutorial:

 

Since I changed it (I had to edit the line of code that causes the problem in order to get no errors, which gave a different error) here was the error before hand: 

Error:(31, 67) error: <anonymous com.airsoftbbstore.evan.flashlight.MainActivity$1> is not abstract and does not override abstract method onClick(View) in OnClickListener

And the original Line of code:

imageButton.setOnClickListener(new View.OnClickListener() {

Share this post


Link to post
Share on other sites
Advertisement

The original code was correct. OnClickListener is an interface, you can't pass values in its anonymous class's constructor.

And your onCLick method has a capital L, that's why it can't override.

 

Share this post


Link to post
Share on other sites

The original code was correct. OnClickListener is an interface, you can't pass values in its anonymous class's constructor.

And your onCLick method has a capital L, that's why it can't override.

I hate those stupid errors, thanks for the 2nd look :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!