当我尝试同步我的应用程序时出现此错误 无法解决:recyclerview-v7 无法解决:支持-v4 我多次尝试相同的问题 请检查我的堆栈跟踪 My App Stack Trace
下面是我的摇篮和依赖项
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.sherdle.universal"
minSdkVersion 16
targetSdkVersion 26
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
//Optionally configure your OneSignal IDs below
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "",
onesignal_google_project_number: ""]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.txt'
}
}
dexOptions {
jumboMode true
}
}
repositories {
flatDir {
dirs 'libs'
}
maven {
url "https://maven.google.com"
}
jcenter();
}
dependencies {
compile 'com.devbrackets.android:exomedia:4.0.3' //TV
compile 'com.google.android.exoplayer:exoplayer:r2.4.3' //TV & Radio
compile 'com.cleveroad:audiovisualization:1.0.0' //Radio
compile 'com.google.code.gson:gson:2.8.0' //WC
compile 'com.squareup.okhttp3:okhttp:3.7.0' //WC
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.onesignal:OneSignal:[3.6.5,4.0.0)'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.duolingo.open:rtl-viewpager:1.0.2'
compile 'com.github.apg-mobile:android-round-textview:v0.0.3'
compile 'com.github.chrisbanes:PhotoView:1.3.0'
compile "com.android.support:cardview-v7:$supportlib_version"
compile "com.android.support:appcompat-v7:$supportlib_version"
compile "com.android.support:recyclerview-v7:$supportlib_version"
compile "com.android.support:design:$supportlib_version"
compile "com.android.support:support-v4:$supportlib_version"
implementation "com.android.support:support-core-utils:$supportlib_version"
compile "com.android.support:support-media-compat:$supportlib_version"
compile "com.google.android.gms:play-services-gcm:$gps_version"
compile "com.google.android.gms:play-services-ads:$gps_version"
compile "com.google.android.gms:play-services-maps:$gps_version"
compile 'com.google.maps.android:android-maps-utils:0.5+'
compile files('libs/YouTubeAndroidPlayerApi.jar')
}
我也试图将值$ supportlib_version更改为具有相同版本的值 我累了,请帮助我。
现在我的gradle不同步。
答案 0 :(得分:0)
我认为您没有在存储库块中为 google()存储库建立索引
这是我的模样。
repositories {
google()
mavenCentral()
jcenter()
}