jitsi-meet-sdk-samples icon indicating copy to clipboard operation
jitsi-meet-sdk-samples copied to clipboard

Not able to implement SDK v7.0.0 & v7.0.1 in Android

Open NilabhB opened this issue 2 years ago • 15 comments

Not able to implement to recent versions of jitsi SDK, use to get gradle sync error. currently stable usable SDK is v6.2.2,
In v6.2.2, youtube video streaming doesn't work, it's not related to bandwidth, there's some problem related to video playback. But in the jitsi-meet app it works perfectly fine (Not talking about the youtube live stream), not sure what's the issue with video playback.

NilabhB avatar Dec 17 '22 20:12 NilabhB

What error do you get with SDK 7.x?

saghul avatar Dec 18 '22 10:12 saghul

jitsi_v7 0 1_error

The gradle will build for around 6 mins & then get fail after that. Here's a screenshot I am attaching it. It's same for both v7.0.0 & v7.0.1

NilabhB avatar Dec 18 '22 11:12 NilabhB

Did you add our maven repo?

saghul avatar Dec 18 '22 12:12 saghul

Yes, I did. My app is already running well in v6.2.2. I just wanted to updated the Jitsi SDK.

maven {
            url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
        }

It's already added.

NilabhB avatar Dec 18 '22 15:12 NilabhB

What Gradle version do you have?

saghul avatar Dec 18 '22 18:12 saghul

gradle_version_screenshot

I am using the most updated version of Android Studio as of today(18/12/2022). The Gradle version is 7.4

NilabhB avatar Dec 18 '22 18:12 NilabhB

Hi @saghul,

Any solutions on this?

NilabhB avatar Dec 19 '22 15:12 NilabhB

It seems that https://github.com/jitsi/jitsi-maven-repository/raw/master/releases is not accessible anymore. I cannot sync dependencies. When I try to paste url in a browser in navigates me to https://github.com/jitsi/jitsi-maven-repository/tree/master/releases but changing raw to tree in gradle file do not work.

I think that raw is now url parameter: ?raw=true

Bresiu avatar Dec 22 '22 09:12 Bresiu

Hi @saghul & @Bresiu,

I found a solution to these issues, the repos are actually good & still accessible, the problem is with the gradle versions or probably the new versions of Android Studios.

In recent versions of Android Studios, allprojects{} might not be found in build.gradle. In that case, the repository goes into the settings.gradle file in the root of your project (Modify the code in settings.gradle):

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven {
            url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
        }
        maven {
            url "https://maven.google.com"
        }
    }
}

After this in module build.gradle use dependency

implementation ('org.jitsi.react:jitsi-meet-sdk:6.2.2') { transitive = true }

Your application will be good with jitsi SDK v6.2.2.

Note: Jitsi SDK v7.0.0 or v7.0.1 will not work simply this way! SDK versions 7.x seems to have an issue with gradle versions. To implement Jitsi SDK v7.x check your gradle version first & make sure it is set to gradle v7.4.2.

How to fix Gradle Version for this project?

  • Go to IDE and Project Settings > Project Structure > Project

  • Set Gradle Version to 7.4.2 (Please note, if you choose above or below v7.4.2, it might not work)

Now sync the project with:

implementation ('org.jitsi.react:jitsi-meet-sdk:7.0.1') { transitive = true }

You are all set with the latest version of Jitsi SDK as of 22/12/2022.

Let me know if this solved your problem, we can close this issue, else I will provide a different approach.

Note: Even with the latest version of Jitsi SDK, the video-sharing feature will not work. I don't know what is the issue. In the original Jitsi Meet App it just works super fine.

You can check my latest Personal Project based on Jitsi SDK for Android: https://github.com/NilabhB/SkyMeet App Link: https://play.google.com/store/apps/details?id=com.skymeet.videoConference

Good Luck!

NilabhB avatar Dec 22 '22 10:12 NilabhB

Thanks for the writeup!

We haven't really changed much from SDK 6 to 7, we bumped the major to indicate a backwards compatibility change.

This may have to do with the Gradle version, including the plugin version. We won't have time to look into this before the end of the year, sorry.

saghul avatar Dec 22 '22 11:12 saghul

Hey,

Thank you so much for the response @saghul.

I have been helping people on stackoverflow & here as well regarding maven repo implementation. Therefore I made a pull request: https://github.com/jitsi/handbook/pull/404

This will solve the problem for all. Would you mind merging it, please?

NilabhB avatar Dec 22 '22 13:12 NilabhB

Merged, thanks for the reminder!

saghul avatar Dec 22 '22 13:12 saghul

Oh, I am so glad. This was my first pull request probably. Thanks to you. Looking forward to contribute more.

NilabhB avatar Dec 22 '22 13:12 NilabhB

Very happy to hear this!

saghul avatar Dec 22 '22 14:12 saghul

pluginManagement { repositories { google() mavenCentral()

gradlePluginPortal()

(url) } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" // i got error on this line } maven { url "https://maven.google.com" // i got error on this line }

}

}

rootProject.name = "first" include(":app")

MacBook1234567890 avatar Oct 07 '23 13:10 MacBook1234567890