This repository was archived by the owner on Mar 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
Android build error: cannot find symbol class JavaNetCookieJar #549
Copy link
Copy link
Open
Description
First of all, thanks for this amazing library. I've used it before in other projects and works like a charm but I'm starting a freshly ejected react-native app and I'm facing to a few problems.
This is my package.json
{
"name": "domo4m_v2",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "^21.0.2",
"react-test-renderer": "16.0.0-alpha.12"
},
"main": "index.js",
"scripts": {
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^21.0.0",
"is-uuid": "^1.0.2",
"moment": "^2.18.1",
"react": "16.0.0-alpha.12",
"react-native": "https://github.com/expo/react-native/archive/sdk-21.0.0.tar.gz",
"react-native-elements": "^0.17.0",
"react-native-fetch-blob": "^0.10.8",
"react-native-i18n": "^2.0.6",
"react-native-keyboard-aware-scroll-view": "^0.3.0",
"react-native-loader": "^1.1.0",
"react-native-modal": "^4.0.0",
"react-native-snackbar": "^0.4.1",
"react-native-swipeout": "^2.2.2",
"react-native-textinput-effects": "^0.4.1",
"react-native-vector-icons": "^4.4.0",
"react-native-video": "^2.0.0",
"react-navigation": "^1.0.0-beta.13",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0",
"uuid": "^3.1.0"
}
}
So I'm using react native v0.48. The problem is when I try to build the project for Android.
<path>/domo4m_v2/node_modules/react-native-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
Error:(24, 15) error: cannot find symbol class JavaNetCookieJar
Error:(54, 55) error: incompatible types: expolib_v1.okhttp3.OkHttpClient cannot be converted to okhttp3.OkHttpClient
Error:(57, 46) error: cannot find symbol class JavaNetCookieJar
Error:Execution failed for task ':react-native-fetch-blob:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
The library is linked properly and everything works fine if I remove it.
For more information:
My build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.d4m.domo4m"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
manifestPlaceholders = [
'appAuthRedirectScheme': 'com.d4m.domo4m'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "8g"
}
}
task exponentPrebuildStep(type: Exec) {
workingDir '../../'
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', '.\\.expo-source\\android\\detach-scripts\\prepare-detached-build.bat'
} else {
commandLine './.expo-source/android/detach-scripts/prepare-detached-build.sh'
}
}
preBuild.dependsOn exponentPrebuildStep
repositories{
flatDir{
dirs 'libs'
}
mavenLocal()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile project(':react-native-i18n')
compile project(':react-native-snackbar')
compile project(':react-native-video')
compile project(':react-native-fetch-blob')
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile('host.exp.exponent:expoview:21.0.0@aar') {
exclude group: 'com.facebook.android', module: 'facebook-android-sdk'
exclude group: 'com.facebook.android', module: 'audience-network-sdk'
exclude group: 'io.nlopez.smartlocation', module: 'library'
transitive = true;
}
compile ('com.facebook.android:facebook-android-sdk:4.+') {
exclude module: 'bolts-android'
}
compile('com.facebook.android:audience-network-sdk:4.+') {
exclude module: 'play-services-ads'
}
compile('io.nlopez.smartlocation:library:3.2.11') {
transitive = false
}
}
Let me know if I can provide more info
Thanks!
maxbbb, pencilcheck, mauroporras, faustoct1, chris-griffin and 4 more
Metadata
Metadata
Assignees
Labels
No labels