NoSuchMethodError When Adding Third @Field in Retrofit 2
<p>I am using Retrofit 2.0 to make requests to my REST API. I have the following method that works fine:</p>

<pre><code>@FormUrlEncoded
@POST("/mobile_register/")
Call&lt;MobileAuthUserJSON&gt; createUser(@Field("username") String username, @Field("password") String password);
</code></pre>

<p>However, when I add a third field like this:</p>

<pre><code>@FormUrlEncoded
@POST("/mobile_register/")
Call&lt;MobileAuthUserJSON&gt; createUser(@Field("username") String username, @Field("password") String password,
                                    @Field("phone_number") String phone_num);
</code></pre>

<p>I am greeted with a: </p>

<blockquote>
  <p>java.lang.NoSuchMethodError: No interface method createUser(Ljava/lang/String;Ljava/lang/String;)Lretrofit2/Call; in
  class Lcom/jiaohuan/jiaohuan/jsonData/UserAPI; or its super classes
  (declaration of 'com.jiaohuan.jiaohuan.jsonData.UserAPI' appears in
  /data/data/com.jiaohuan.jiaohuan/files/instant-run/dex/slice-slice_5-classes.dex)</p>
</blockquote>

<p>I cannot for the life of me figure out why this is happening, it can't be an error with the server because:</p>

<p>1) The app crashes before it even makes the request</p>

<p>2) I have already set up the server to handle receiving the "phone_number" field.</p>