jitsi依赖性不工作在2022年在android studio?

fkvaft9z  于 2022-12-21  发布在  Android
关注(0)|答案(1)|浏览(150)

无法找到org.jitsi.react:jitsi-meet-sdk:7.0.1。单击下面代码后面的链接查看此错误的屏幕截图
我试着在www.example.com文件中正确地放置依赖项gradle.build,但是我一直得到这个错误。我已经纠结了一个星期了
有人能告诉我2022年你们是如何应对这个问题的吗?

以下是gradle.build项目级别的www.example.com

buildscript {
    repositories {
        maven {
            url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
        }
        google()
        mavenCentral()
        maven { url 'https://www.jitpack.io' }
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.3.14'
    }
}

这里是gradle.build应用程序级别的www.example.com

plugins {
    id 'com.android.application' version '7.1.0' apply false
    id 'com.android.library' version '7.1.0' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}  
  
  
**Here is gradle.build at app level**
  
plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
}

android {
    compileSdk 32

    defaultConfig {
        applicationId "com.example.mlimivirtualmeeting"
        minSdk 21
        targetSdk 32
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'com.google.android.material:material:1.7.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

    //scalable size unit (support for different screen sizes)
    implementation 'com.intuit.sdp:sdp-android:1.0.6'
    implementation 'com.intuit.ssp:ssp-android:1.0.6'

    //RecyclerView
    implementation 'androidx.recyclerview:recyclerview:1.2.1' //1.1.0

    //Material design
    implementation 'com.google.android.material:material:1.7.0' //1.1.0
    //MultiDex
    //implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.android.support:multidex:1.0.3'

    //Retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.9.0'

    //Swipe refresh layout
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

    //Firebase
    implementation 'com.google.firebase:firebase-messaging:23.1.1' //'com.google.firebase:firebase-messaging:23.1.0'
    implementation 'com.google.firebase:firebase-firestore:24.4.1'

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

}

This is the error being displayed

vfh0ocws

vfh0ocws1#

在Android Studios的最新版本中,build.gradle中可能找不到allprojects{}。在这种情况下,存储库将进入项目根目录中的settings.gradle文件(修改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"
        }
    }
}

之后,在模块build.gradle中使用依赖关系

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

您的应用程序可以很好地使用jitsi SDK v6.2.2。

**注意:**Jitsi SDK v7.0.0或v7.0.1不能简单地以这种方式工作!SDK v7.x似乎与gradle版本存在问题。要实施Jitsi SDK v7.x,请先检查您的gradle版本,并确保将其设置为gradle v7.4.2。

如何修复此项目的Gradle版本?

  • 转至IDE和项目设置项目结构项目
  • Gradle版本设置为7.4.2

现在将项目同步到:

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

您已经安装了2022年12月20日发布的最新版Jitsi SDK。
祝你好运!

相关问题