wkh237 / react-native-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.61k stars 1.59k forks source link

Build fails - Could not find com.atlassian.mobile #375

Open amirfefer opened 7 years ago

amirfefer commented 7 years ago

Build fails due to absent of com.atlassian.mobile.video:okhttp-ws-compat:3.7.0

* 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

ugendrang commented 7 years ago

+1

jackfiallos commented 7 years ago

Read more about this #14225

lavarajallu commented 7 years ago

Update the Version Package.Json,

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

after that npm install --force

janaka120 commented 7 years ago

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
                }
            }
        }
    }  
}