error: cannot find symbol import com.facebook.react.modules.network.CookieJarContainer;
See original GitHub issueThis all started with the rn-fetch-blob. The error hasnt occured in the previous version of react-native fetch-blob i was using. The solutions available aint helping at all. The Update build.gradle # 623 removes few of the errors. This is the error that shows up when i run react-native run-android `> Task :rn-fetch-blob:compileDebugJavaWithJavac C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:25: error: cannot find symbol import com.facebook.react.modules.network.CookieJarContainer; ^ symbol: class CookieJarContainer location: package com.facebook.react.modules.network C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:28: error: cannot find symbol import okhttp3.JavaNetCookieJar; ^ symbol: class JavaNetCookieJar location: package okhttp3 C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:56: error: incompatible types: com.squareup.okhttp.OkHttpClient cannot be converted to okhttp3.OkHttpClient mClient = OkHttpClientProvider.getOkHttpClient(); ^ C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:58: error: cannot find symbol CookieJarContainer mCookieJarContainer = (CookieJarContainer) mClient.cookieJar(); ^ symbol: class CookieJarContainer location: class RNFetchBlob C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:58: error: cannot find symbol CookieJarContainer mCookieJarContainer = (CookieJarContainer) mClient.cookieJar(); ^ symbol: class CookieJarContainer location: class RNFetchBlob C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:59: error: cannot find symbol mCookieJarContainer.setCookieJar(new JavaNetCookieJar(mCookieHandler)); ^ symbol: class JavaNetCookieJar location: class RNFetchBlob C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:62: error: <anonymous com.RNFetchBlob.RNFetchBlob$1> is not abstract and does not override abstract method onActivityResult(int,int,Intent) in ActivityEventListener reactContext.addActivityEventListener(new ActivityEventListener() { ^ C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:63: error: method does not override or implement a method from a supertype @Override ^ C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlob.java:72: error: method does not override or implement a method from a supertype @Override ^ Note: C:\Users\LUTAAYA BRIAN IVAN\BrianExternal\PaX\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlobUtils.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 9 errors
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:rn-fetch-blob:compileDebugJavaWithJavac’.
Compilation failed; see the compiler error output for details.
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Get more help at https://help.gradle.org
BUILD FAILED in 17m 52s 78 actionable tasks: 2 executed, 76 up-to-date Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html`
All help is truly appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top GitHub Comments
I’ve fixed the build issue with help of the following tips: https://github.com/wkh237/react-native-fetch-blob/issues/481
Workaround
change imports okhttp3 and okio and use of
new okhttp3.
tonew expolib_v1.okhttp3
I know it’s just a workaround. Do you have any idea how to fix it for the future?
Hi, many thanks for your answer.
This is my android/app/build.gradle after linking rn-fetch.blob and the detailed error description:
android/app/build.gradle
Detail Error from Android Studio