Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

[Android] Deprecated OKHeaders from OKHttp #78

Closed
@mlumbroso

Description

@mlumbroso

On compiling with RN 0.31, I have this error message :

C:\Dev\node_modules\react-native-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlobReq.java:48: error: cannot find symbol
import okhttp3.internal.http.OkHeaders;
                            ^
  symbol:   class OkHeaders
  location: package okhttp3.internal.http
Note: C:\Dev\node_modules\react-native-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlobUtils.java uses or overrides a deprecated API.

:react-native-fetch-blob:compileReleaseJavaWithJavac FAILED

After a little investigation, OKHeaders.java was removed from version 3.4.0
https://github.com/square/okhttp/tree/parent-3.4.0/okhttp/src/main/java/okhttp3/internal/http

Last version to include it is 3.3.1
https://github.com/square/okhttp/tree/parent-3.3.1/okhttp/src/main/java/okhttp3/internal/http

I don't know what's best here :

  1. Either inform users to downgrade okhttp to use 3.3.1
  2. Modify the RNFetchBlobReq.java to use HttpHeaders that replace OKHeaders.

Don't know the potential drawbacks of either method, will let you make that choice ;-)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions