NoSuchErrorMethod: substituteMobilePlatform

I’m running on OSX 10.9.5 with Appium 1.3.4, java-client-2.1.0.jar in my build path, and testing with Java on an Android 4.4.2 emulator.

My test immediately fails with the following error:

[testng] FAILED CONFIGURATION: @BeforeMethod setUp
[testng] java.lang.NoSuchMethoderror: io.appium.java_client.android.AndroidDriver.substituteMobilePlatform(Lorg/openqa/selenium/Capabilities;Ljava/lang/String;)Lorg/openqa/selenium/Capabilities;
[testng]     at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:39)

Checking on GitHub, I can see that this method is inherited from AppiumDriver.java, so assuming that the .jar in the Maven repository, where I got it, isn’t messed up in some way, it’s there and this should be working…