React-native-fetch-blob: Unable to run on Android (error: package okhttp3 does not exist)

Created on 22 Dec 2016  路  2Comments  路  Source: wkh237/react-native-fetch-blob

I can't run my project on Android because the error : error: package okhttp3 does not exist import okhttp3.MediaType; keeps showing on run.

I've tried several solutions like adding compile 'com.squareup.okhttp3:okhttp:3.4.1' to my build.gradle file but nothing worked !

RN : 0.39.2
RNFB : 0.10.0

android

Most helpful comment

We worked around this by adding okhttp3 react-native-fetch-blob's build.gradle file:

dependencies {
    compile 'com.facebook.react:react-native:+'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    //{RNFetchBlob_PRE_0.28_DEPDENDENCY}
}

All 2 comments

We worked around this by adding okhttp3 react-native-fetch-blob's build.gradle file:

dependencies {
    compile 'com.facebook.react:react-native:+'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    //{RNFetchBlob_PRE_0.28_DEPDENDENCY}
}

i am also facing same issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nielsswinkels picture nielsswinkels  路  3Comments

Draccan picture Draccan  路  3Comments

amirfefer picture amirfefer  路  4Comments

mykelaballe picture mykelaballe  路  4Comments

timsuchanek picture timsuchanek  路  4Comments