React-native-fetch-blob: Build fails - Could not find com.atlassian.mobile

Created on 27 May 2017  路  4Comments  路  Source: wkh237/react-native-fetch-blob

Build fails due to absent of com.atlassian.mobile.video:okhttp-ws-compat:3.7.0
```{r, engine='bash', count_lines}

  • What went wrong:
    A problem occurred configuring project ':app'.

A problem occurred configuring project ':react-native-fetch-blob'.
Could not resolve all dependencies for configuration ':react-native-fetch-blob:_debugCompile'.
Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1.
Searched in the following locations:
https://jitpack.io/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0
-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom
https://jitpack.io/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0
-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar
```
RN 0.41.2

android trouble shooting

Most helpful comment

I had the same problem. I found out solution in #14223

Since gradle doesn't support declaring repositories on a per-artifact basis yet.

Add this modification to build.gradle (not app/build.gradle) to force all dependency to react-native to the specific version:

  allprojects {
     configurations.all {
       resolutionStrategy {
         eachDependency { DependencyResolveDetails details ->
           if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
             details.useVersion "0.38.0" // Your real React Native version here
           }
         }
       }
     }
  }

if you are using this code you don't need to add react-native version manually,

allprojects {
     configurations.all {
        resolutionStrategy {
            eachDependency { DependencyResolveDetails details ->
                if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
                    def file = new File("$rootDir/../node_modules/react-native/package.json")
                    def version = new groovy.json.JsonSlurper().parseText(file.text).version
                    details.useVersion version
                }
            }
        }
    }  
}

All 4 comments

+1

Read more about this #14225

Update the Version Package.Json,

"react": "16.0.0-alpha.3",
"react-native": "0.43.1",

after that
npm install --force

I had the same problem. I found out solution in #14223

Since gradle doesn't support declaring repositories on a per-artifact basis yet.

Add this modification to build.gradle (not app/build.gradle) to force all dependency to react-native to the specific version:

  allprojects {
     configurations.all {
       resolutionStrategy {
         eachDependency { DependencyResolveDetails details ->
           if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
             details.useVersion "0.38.0" // Your real React Native version here
           }
         }
       }
     }
  }

if you are using this code you don't need to add react-native version manually,

allprojects {
     configurations.all {
        resolutionStrategy {
            eachDependency { DependencyResolveDetails details ->
                if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
                    def file = new File("$rootDir/../node_modules/react-native/package.json")
                    def version = new groovy.json.JsonSlurper().parseText(file.text).version
                    details.useVersion version
                }
            }
        }
    }  
}
Was this page helpful?
0 / 5 - 0 ratings