Troubleshooting GWT compiler errors

GWT is great but the compiler errors it emits can definitely leave you confused. Here's a few things I've run into with GWT 2.9.0 that tripped me up.

"Unable to create or inherit binding"

TL;DR - Don't use the diamond operator <> in GWT-RPC calls!

This stole hours of my life. At one point I was happily compiling and deploying my code, then I was stuck with seemingly identical code that no longer compiled.

Long story short I was using GWT-RPC and I had a call like this:

IOT_SERVICE_ASYNC.getSignInUrl(activationId, new AsyncCallback<String>() {

IntelliJ reminded me that I don't need the full new AsyncCallback<String>() syntax so I changed it to the diamond operator. And that's when everything broke.

Don't use the diamond operator in GWT-RPC calls. If you see any errors similar to what I have below then look in your code for the diamond operator and make the type information explicit to see if that helps.

[ERROR] Error injecting awslabs.client.application.ApplicationPresenter$MyProxy: Unable to create or inherit binding: No @Inject or default constructor found for awslabs.client.application.ApplicationPresenter$MyProxy
[ERROR] Error injecting awslabs.client.application.ApplicationView$Binder: Unable to create or inherit binding: No @Inject or default constructor found for awslabs.client.application.ApplicationView$Binder
[ERROR] Errors in 'gen/com/gwtplatform/mvp/client/DesktopGinjectorProvider.java'
[ERROR] Line 8: Failed to resolve 'com.gwtplatform.mvp.client.DesktopGinjector' via deferred binding
[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[WARN] com.gwtplatform.mvp.client.com_gwtplatform_mvp_client_DesktopGinjectorImpl