Solution for "Error 71 (Protocol error) dispatching to Wayland display." on Linux

I was getting the following error when trying to install the SDK:

$ ./sdkmanager 
./sdkmanager: /lib64/libcurl.so.4: no version information available (required by ./sdkmanager)
Gdk-Message: 15:47:15.166: Error 71 (Protocol error) dispatching to Wayland display.

I resolved it by launching it with the following option:

$ WEBKIT_DISABLE_COMPOSITING_MODE=1 ./sdkmanager