skip to Main Content

I build an android webrtc app but when adding webrtc to the android studio project (implementation ‘org.webrtc:google-webrtc:1.0.+’), I get this error : Failed to resolve: org.webrtc:google-webrtc

How to add webrtc to an android app ?

5

Answers


  1. Currently it seems we are forced to keep jcenter, a deprecated repository, to install this package. Jcenter remain readonly and is not removed for now.

    For production you could considere making your own build.

    // root build.gradle
    allprojects {
        repositories {
            jcenter()
    

    you can check this issue from twillio

    Login or Signup to reply.
  2. //Android => App => build.gradle

    repositories {
        jcenter()
    }
    
    dependencies {
        
    }
    
    Login or Signup to reply.
  3. Try it with on maven central. I think this is the latest build based on the published date.

    https://mvnrepository.com/artifact/org.webrtc/google-webrtc/1.0.32006

    In app build.gradle:

    implementation 'org.webrtc:google-webrtc:1.0.32006'
    

    In project build.gradle:

    repositories {
        google()
        mavenCentral()
    }
    
    Login or Signup to reply.
  4. Just take the step:

         implementation 'org.webrtc:google-webrtc:1.0+'
    

    and Replace in code:

         implementation 'org.webrtc:google-webrtc:1.0.32006'
    

    ☻♥ Done Keep Code

    Login or Signup to reply.
  5. //In the settings.gradle file

    dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        //add jcenter()
        jcenter()
    }
    

    }

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search