java.lang.NoSuchFieldError: No static field METHODS of type Ljava/util/Set; in class Lcom/squareup/okhttp/internal/http/HttpMethod; or its superclasses (declaration of 'com.squareup.okhttp.internal.http.HttpMethod' appears in /data/app/com.mehconsulting.mehrestclient-1/base.apk)

Stack Overflow | Mark Hansen | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    NoSuchFieldError when trying to access REST service method via Retrofit and SSL

    Stack Overflow | 6 months ago | Mark Hansen
    java.lang.NoSuchFieldError: No static field METHODS of type Ljava/util/Set; in class Lcom/squareup/okhttp/internal/http/HttpMethod; or its superclasses (declaration of 'com.squareup.okhttp.internal.http.HttpMethod' appears in /data/app/com.mehconsulting.mehrestclient-1/base.apk)

    Root Cause Analysis

    1. java.lang.NoSuchFieldError

      No static field METHODS of type Ljava/util/Set; in class Lcom/squareup/okhttp/internal/http/HttpMethod; or its superclasses (declaration of 'com.squareup.okhttp.internal.http.HttpMethod' appears in /data/app/com.mehconsulting.mehrestclient-1/base.apk)

      at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.setRequestMethod()
    2. OkHttp URLConnection
      HttpsURLConnectionImpl.setRequestMethod
      1. com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.setRequestMethod(HttpURLConnectionImpl.java:550)
      2. com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.setRequestMethod(DelegatingHttpsURLConnection.java:113)
      3. com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.setRequestMethod(HttpsURLConnectionImpl.java:25)
      3 frames
    3. Retrofit
      CallbackRunnable.run
      1. retrofit.client.UrlConnectionClient.prepareRequest(UrlConnectionClient.java:50)
      2. retrofit.client.UrlConnectionClient.execute(UrlConnectionClient.java:37)
      3. retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:321)
      4. retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
      5. retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
      6. retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
      6 frames
    4. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
      2 frames
    5. Retrofit
      Platform$Android$2$1.run
      1. retrofit.Platform$Android$2$1.run(Platform.java:142)
      1 frame
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:818)
      1 frame