![](/img/trans.png)
[英]Failed to resolve: com.android.support:appcompat-v7:21.0.1
[英]Failed to resolve: com.android.support:appcompat-v7:31.0.0
我正在嘗試將 Jitsi meet sdk 添加到我的 android 項目中。
我已經實現('org.jitsi.react:jitsi-meet-sdk:5.0.2'){傳遞=真}和
maven { url 'https://github.com/jitsi/jitsi-maven-repository/raw/master/releases' }
但它給出了錯誤:無法解決:com.github.MatrixFrog:android-scalablevideoview:v1.0.4-Packet
我嘗試通過添加 maven jitpack.io 來解決這個問題,但它仍然給我錯誤:
無法解決:com.android.support:appcompat-v7:31.0.0 盡管實施了我該如何解決這個問題? 請幫我
我的設置.gradle:
插件管理 {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
依賴解析管理{
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com'}
maven { url 'https://www.jitpack.io' }
maven { url 'https://github.com/jitsi/jitsi-maven-repository/raw/master/releases' }
}
}
build.gradle(:app)
插件{
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
}
android {
compileSdk 31
buildToolsVersion "31.0.0"
defaultConfig {
applicationId "kma.longhoang.kmaelearning"
minSdk 24
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
viewBinding true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
依賴{
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-messaging-ktx:23.0.4'
implementation 'com.google.firebase:firebase-firestore-ktx:24.1.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation platform('com.google.firebase:firebase-bom:29.1.0')
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.9.0'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
implementation('org.jitsi.react:jitsi-meet-sdk:5.0.2') { transitive = true }
implementation 'com.android.support:appcompat-v7:31.0.0'
}
我的建議是實施 com.android.support:appcompat-v7:31.0.0
並通過將下面的行添加到您的 gradle.properties android.enableJetifier=true 來啟用 jetifire
試試這個我和 Jitsi 有同樣的問題它已經解決了
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com'}
maven { url 'https://www.jitpack.io' }
maven { url 'https://github.com/jitsi/jitsi-maven-repository/raw/master/releases' }
ADD THIS code--------------------
//noinspection JcenterRepositoryObsolete
jcenter() {
content {
includeModule("com.yqritc", "android-scalablevideoview")
}
}
---------------------till Here------------
}
}
支持自由的最新版本是 v28。 v31 版本不存在。
只需刪除依賴項:
implementation 'com.android.support:appcompat-v7:31.0.0'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.