Why can't error messages actually be useful sometimes.

June 5, 2016

So I just spent the past 30 minutes wracking my brain, why wasn't this working?

It should have been so simple. I had a class, "Main", and it was implementing an interface that had a couple methods, we'll call them "a" and "b". I was totally implementing them! There should have been no problems! And yet...

Compiling 3 source files to C:\proj\bin\classes
C:proj\Main.java:19: error: cannot find symbol
    public void a(DialogFragment dialog) {
                                      ^
  symbol:   class DialogFragment
  location: class Main
C:proj\Main.java:26: error: cannot find symbol
    public void b(DialogFragment dialog) {
                                      ^
  symbol:   class DialogFragment
  location: class Main
2 errors

BUILD FAILED
The following error occurred while executing this line:
Compile failed; see the compiler error output for details.

Total time: 1 second
  

And why?? WHY?? Because I was importing this:

android.app.DialogFragment;

instead of this:

android.support.v4.app.DialogFragment;

Contact me at byronka (at) msn.com