29

I'm developing a React-native app and all of a sudden I started getting the following error:

  • What went wrong: A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-config'. Could not resolve all dependencies for configuration ':react-native-config:_debugPublishCopy'. Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1. Required by: cabm8:react-native-config:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1

I got rid of the module react-native-config but still facing a similar error:

  • What went wrong: A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-maps'. Could not resolve all dependencies for configuration ':react-native-maps:_debugPublishCopy'. Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1. Required by: cabm8:react-native-maps:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1

The issue seems to be related to com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1 somehow.

I've tried reinstalling node_modules, removed the folders android and ios then restored them using git. What else could I try?

6 Answers 6

23

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you so much! It worked for me after update Android Studio too.
This is a solution from the same issue thread that will get the version automatically: github.com/facebook/react-native/issues/…
15

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

5 Comments

Thanks! I've just tried it and It did solve my original problem but encountering another issue now that might be due to outdated deps caused by react16.
Thanks @ishaan-sharma, to make it works using you suggestion I had to upgrade react to 16.0.0-alpha.6 (instead of 16.0.0-alpha.3 you suggested) as I had the error: npm WARN [email protected] requires a peer of [email protected] but none was installed.
you might need a npm install --force or else npm will throw and unmet peer dependency and skip the install on windows, happned to me quite a few times while trying to solve this problem
@Fuzaill'Corder correct, I forgot to mention it earlier as I was using linux
After this I also had to change the protected in protected boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } to public in MainApplication.java
2

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.

1 Comment

I think update react native version is not a good idea. Because it may cause the other RN lib using in the project.
1

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.

Comments

0

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?

Comments

0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.