question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR: Unable to resolve dependency for ':react-native-video@debug/compileClasspath

See original GitHub issue

Current behavior

Describe what happens when you encounter this issue.

Hello. I am unable to build or run the project on Android.

I get this error on Android Studio


ERROR: Unable to resolve dependency for ':react-native-video@debug/compileClasspath': Could not resolve com.squareup.okhttp3:okhttp:3.9.1.
Show Details
Affected Modules: react-native-video


ERROR: Unable to resolve dependency for ':react-native-video@debug/compileClasspath': Could not resolve com.squareup.okio:okio:1.13.0.
Show Details
Affected Modules: react-native-video


ERROR: Unable to resolve dependency for ':react-native-video@debug/compileClasspath': Could not resolve com.squareup.okhttp3:okhttp:3.10.0.
Show Details
Affected Modules: react-native-video


ERROR: Unable to resolve dependency for ':react-native-video@debug/compileClasspath': Could not resolve com.squareup.okio:okio:1.14.0.
Show Details
Affected Modules: react-native-video

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
Adetiwacommented, Mar 15, 2019

Hi @B4UGUYS, I simply changed the react native video dependency to this, and the project built successfully.

dependencies {
    compileOnly 'com.facebook.react:react-native:+'
    implementation 'com.google.android.exoplayer:exoplayer:2.7.3'

    implementation('com.google.android.exoplayer:extension-okhttp:2.9.3') {
        exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    }
    implementation 'com.squareup.okhttp3:okhttp:3.12.1'
}
5reactions
ahmaddehnavicommented, Apr 17, 2019

Hi @B4UGUYS, I simply changed the react native video dependency to this, and the project built successfully.

dependencies {
    compileOnly 'com.facebook.react:react-native:+'
    implementation 'com.google.android.exoplayer:exoplayer:2.7.3'

    implementation('com.google.android.exoplayer:extension-okhttp:2.9.3') {
        exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    }
    implementation 'com.squareup.okhttp3:okhttp:3.12.1'
}

// without change library code

implementation (project(':react-native-video')){
       exclude group: 'com.squareup.okhttp3', module: 'okhttp'
       exclude group: 'com.google.android.exoplayer', module: 'exoplayer'
}
 implementation('com.google.android.exoplayer:exoplayer:2.7.3') {
       exclude group: 'com.android.support'
 }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to resolve dependency for ':app@debug ...
I just figured out how to remove this gradle error, follow the following steps. Go to "File". Click on Invalidate Cache/ Restart.
Read more >
app@debug/compileClasspath': Could not resolve project ...
ERROR : Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :react-native-notifications.
Read more >
Unable to resolve dependency for ':app@debug ... - YouTube
ERROR : Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve ...
Read more >
Unable to resolve dependency for ':app@debug ... - YouTube
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.
Read more >
Android Studio “Unable to resolve dependency” Error - Medium
The most of users encounter errors like “Unable to resolve dependency for ':app@debug/ compileClasspath': Could not find any version that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found