React-native dependency error (com.atlassian.mobile.video okhttp-ws-compat)

陌路散爱 提交于 2019-11-30 02:57:27
Ishaan Sharma

com.atlassian.mobile.video is not avaible on maven right now. To run your project you need to update it

Update your react and react-native version to in your package.json file

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

Then remove node_modules and do a npm install again

Let me know if it works for you

imarem

In your build.gradle (not in android/app/build.gradle) add this lines to force all dependency to react-native to specific version:

allprojects {

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

This configuration worked for me. I hope this will help.

FYI this error is tracked here: https://github.com/facebook/react-native/issues/14225

I was able to fix by specifying the following versions of react and react-native:

  • "react": "15.4.1",
  • "react-native": "0.42.3"

See https://github.com/oblador/react-native-vector-icons/issues/480#issuecomment-304471394.

Add this to your build.gradle(not in app/build.gradle) file in the android folder. you don't want 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
                }
            }
        }
    }
}

I think this will help.

Same issue, looked in the source code but couldn't find a reference to "atlassian" anywhere so I turned off wifi (to see if any calls are being made to get an external resource) and got the following

Could not resolve all dependencies for configuration ':react-native-google-analytics-bridge:_debugPublishCopy'. Could not resolve com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1. Required by: OneUps:react-native-google-analytics-bridge:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1 Could not resolve com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1. Could not get resource 'https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom'.

If you follow that link it looks like that package has been removed which I guess is causing the issue?

in your root build.Gradle force all dependencies to a specific version.

allprojects {
 configurations.all {
   resolutionStrategy {
     eachDependency { DependencyResolveDetails details ->
       if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
         details.useVersion "0.40.0" // Your React Native version here
       }
     }
   }
 }
  }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!