gpt4 book ai didi

android - 无法解析 : com. android.support :appcompat-v7:27. 0.2

转载 作者:行者123 更新时间:2023-11-29 18:58:11 25 4
gpt4 key购买 nike

我厌倦了在 android studio 中解决这个错误。我真的浪费了宝贵的 2 天时间来解决这个愚蠢的错误。伙计们,请尝试帮助我摆脱这种情况。不要认为我在 SO 上留下了任何我没有尝试过的链接。但没有运气。

我正在使用 android studio 2.3.3

我的根级gradle文件如下:-

    buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

我的应用构建如下:-

  apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.myAppId"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
mavenCentral()
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:recyclerview-v7:25.2.+'
compile 'com.android.support:design:25.2.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.retrofit2:converter-scalars:2.3.0'
compile 'com.google.android.gms:play-services-location:9.2.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.android.gms:play-services-auth:9.2.1'
testCompile 'junit:junit:4.12'
compile files('libs/ormlite-android-4.43.jar')
compile files('libs/ormlite-core-4.43.jar')
compile files('libs/universal-image-loader-1.9.5.jar')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.androidanimations:library:1.0.3@aar'
compile 'in.srain.cube:grid-view-with-header-footer:1.0.12'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:palette-v7:25.2.0'
compile 'com.github.jd-alexander:LikeButton:0.2.1'
compile 'com.github.techery:properratingbar:0.0.5'
compile 'com.github.GoodieBag:Pinview:v1.3'
compile project(':library')
}
apply plugin: 'com.google.gms.google-services'

我的 gradle-wrapper.properties:-

 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

我使用的构建工具版本为 25.0.2。我不知道为什么它会给我错误 27.0.2。

我面临以下错误:-

Error in AS

最佳答案

得到解决方案。只是替换

compile 'com.facebook.android:facebook-android-sdk:[4,5)'

compile 'com.facebook.android:facebook-android-sdk:4.26.0'

关于android - 无法解析 : com. android.support :appcompat-v7:27. 0.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49553887/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com