git 无法解析 com.android.support:support-v4:[26.0.0,26.1.0) 安装 Repository 并同步项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45773705/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Failed to resolve com.android.support:support-v4:[26.0.0,26.1.0) Install Repository and sync project
提问by Murat Murat
Please help me.
请帮我。
Uygulama ?nceden ?al???yordu.
Uygulama ?nceden ?al?yordu。
Ama ?imdi ?al??m?yor
Ama ?imdi ?al??m?yor
Here is the errors message when gradle sync
这是 gradle 同步时的错误消息
Here is my app Gradle configuration:
这是我的应用程序 Gradle 配置:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName '1.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.txt'
}
}
repositories {
jcenter()
mavenCentral() // GPUImage for Android
}
dexOptions {
javaMaxHeapSize "4g"
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/acra-4.5.0.jar')
compile files('libs/ormlite-android-4.43.jar')
compile files('libs/ormlite-core-4.43.jar')
compile files('libs/mysql-connector-java-3.0.17-ga-bin.jar')
androidTestCompile('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// If you want to use the GPU Filters
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:customtabs:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.onesignal:OneSignal:[3.5.3,4.0.0)'
compile 'com.google.firebase:firebase-ads:10.0.0'
compile 'com.google.firebase:firebase-messaging:10.0.0'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.mikhaellopez:circularimageview:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
回答by Benjamin
In your application build.gradle
在您的应用程序中 build.gradle
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
And then add the dependencie(s):
然后添加依赖项:
dependencies {
compile "com.android.support:support-compat:26.0.1"
}
You should read this https://developer.android.com/topic/libraries/support-library/setup.html
你应该阅读这个https://developer.android.com/topic/libraries/support-library/setup.html