Could not resolve com.google.android:flexbox:2.0.1 for zoom-sdk-android-5.5.1.1319

Adding the zoom-sdk-android-5.5.1.1319 and commonlib and mobilertc aswell when i am trying to run the app it is showing the error “Could not resolve com.google.android:flexbox:2.0.1” Even added the implementation ‘com.google.android:flexbox:2.0.1’ but could not solve the issue.

ext.kotlin_version = “1.5.10”
repositories {
google()
mavenCentral()
}
dependencies {
classpath ‘com.android.tools.build:gradle:4.2.2’
classpath “org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version”

added the error message SS. Can anyone please help me solve this issue

Hi @imranrana07, thanks for using our SDK.

It looks like there are some missing dependencies in your project. To resolve this, take a look at the sample project included with the SDK and ensure that your mobilertc/build.gradle file matches the contents of the same file in the sample project.

Thanks!

i have added
multiDexEnabled true
vectorDrawables.useSupportLibrary = true

lintOptions {
checkReleaseBuilds false
abortOnError false
}
and
implementation project(’:commonlib’)
implementation project(’:mobilertc’)
but still did not work

one more thing what i see,gradle cannot resolve flexbox 2.0.1 but can recognize flexbox:3.0.0’.
is that any reason of showing error?

Do you have any solution for my question?

Hi @imranrana07,

It seems that you are looking at the build.gradle file found in your app module. If you take a look at the build.gradle file found in the mobilertc module of the sample app, you should see the following:

configurations.create("default")
artifacts.add("default", file('mobilertc.aar'))

dependencies.add("default","androidx.security:security-crypto:1.1.0-alpha02")
dependencies.add("default","com.google.crypto.tink:tink-android:1.5.0")
dependencies.add("default","androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

dependencies.add("default","androidx.appcompat:appcompat:1.0.0")
dependencies.add("default","androidx.constraintlayout:constraintlayout:1.1.3")
dependencies.add("default","com.google.android.material:material:1.2.0-alpha03")
dependencies.add("default","com.google.android:flexbox:2.0.1")
dependencies.add("default","androidx.multidex:multidex:2.0.0")

Adding these to your project’s mobilertc/build.gradle file should resolve the issue.

Thanks!

It is because you have made mavenCentral as your repository source and com.google.android:flexbox:2.0.1 cannot be found in mavenCentral.

1 Like

Thanks @hangma, great catch!

It is definitely a good idea to ensure that the correct repositories have been added to your project’s build.gradle file. Currently, the sample app contains the following:

repositories {
    google()
    jcenter()
}

Thanks!

So what’s the solution now?

Hi @imranrana07,

Can you try adding the jcenter() line to the repositories block in your build.gradle file?

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.