title: java.lang.IllegalArgumentException : must not have replace block. For dynamic query parameters use @Query
body: <p>I am trying to converting the USD into INR b using an API with 'convert' endpoint, this is the error down below which i facing again and again</p>
  <pre><code>java.lang.IllegalArgumentException: URL query string &quot;api_key={api_key}&amp;base={base}&amp;to={to}&amp;amount={amount}&quot; must not have replace block. For dynamic query parameters use @Query.
      for method RetrofitClient.getConvertedValue
      at retrofit2.Utils.methodError(Utils.java:52)
      at retrofit2.Utils.methodError(Utils.java:42)
      at retrofit2.RequestFactory$Builder.parseHttpMethodAndPath(RequestFactory.java:257)
      at retrofit2.RequestFactory$Builder.parseMethodAnnotation(RequestFactory.java:205)
      at retrofit2.RequestFactory$Builder.build(RequestFactory.java:161)
      at retrofit2.RequestFactory.parseAnnotations(RequestFactory.java:65)
      at retrofit2.ServiceMethod.parseAnnotations(ServiceMethod.java:25)
      at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:168)
      at retrofit2.Retrofit$1.invoke(Retrofit.java:147)
      at java.lang.reflect.Proxy.invoke(Proxy.java:813)
      at $Proxy0.getConvertedValue(Unknown Source)
      at com.example.online_currency.MainActivity.onClick(MainActivity.java:57)
      at android.view.View.performClick(View.java:5609)
      at android.view.View$PerformClick.run(View.java:22263)
      at android.os.Handler.handleCallback(Handler.java:751)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:154)
      at android.app.ActivityThread.main(ActivityThread.java:6077)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
  </code></pre>
  <p>//Here is My class where i'm creating retrofit object</p>
  <p>public class MainActivity extends AppCompatActivity implements View.OnClickListener{</p>
  <pre><code>private static final String TAG = &quot;MainActivity&quot;;
  private TextView result;
  private EditText currency;
  private Button button;
  private static String BASE_URL = &quot;https://api.currencyscoop.com/v1/&quot;;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Log.d(TAG, &quot;onCreate: called&quot;);
      initViews();
      button.setOnClickListener(this);
  }
  
  public void initViews(){
      Log.d(TAG, &quot;initViews: called&quot;);
      result = findViewById(R.id.result);
      currency = findViewById(R.id.amount);
      button = findViewById(R.id.button);
  }
  
  @Override
  public void onClick(View v) {
      Log.d(TAG, &quot;onClick: called&quot;);
      Retrofit retrofit = new Retrofit.Builder()
              .baseUrl(BASE_URL)
              .addConverterFactory(GsonConverterFactory.create())
              .build();
      RetrofitClient retrofitClient = retrofit.create(RetrofitClient.class);
      Call&lt;ConvertAmt&gt; calling = retrofitClient.getConvertedValue(&quot;&lt;my_api_key&gt;&quot;,&quot;USD&quot;, &quot;INR&quot;, currency.getText().toString());
      calling.enqueue(new Callback&lt;ConvertAmt&gt;() {
          @Override
          public void onResponse(Call&lt;ConvertAmt&gt; call, Response&lt;ConvertAmt&gt; response) {
              Log.d(TAG, &quot;onResponse: called :----------------------&gt; &quot;+response.body().getResult());
          }
  
          @Override
          public void onFailure(Call&lt;ConvertAmt&gt; call, Throwable t) {
              Toast.makeText(MainActivity.this, &quot;Error &quot;+t.getMessage(),Toast.LENGTH_LONG).show();
          }
      });
  }
  </code></pre>
  <p>}</p>
  <pre><code>//here is my RetrofitClient interface
  </code></pre>
  <p>public interface RetrofitClient {</p>
  <pre><code>@GET(&quot;convert?api_key={api_key}&amp;base={base}&amp;to={to}&amp;amount={amount}&quot;)
  Call&lt;ConvertAmt&gt; getConvertedValue(@Query(&quot;api_key&quot;) String api_key, @Query(&quot;base&quot;) String base, @Query(&quot;to&quot;) String to, @Query(&quot;amount&quot;) String amount);
  </code></pre>
  <p>}</p>