gpt4 book ai didi

android - 我该如何解决? `Failed to resolve: com.crashlytics.sdk.android:crashlytics:com.crashlytics.tools.gradle`

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

我在我的应用程序上设置了 firebase 的 crashlytics。

但是在gradle构建的时候出现如下错误

我尝试过的事情:

  1. 为了解决这个问题,我尝试过更换版本,没有解决。

  2. 我更改了存储库的顺序,但这也不是解决方案。

============================================= =============

错误日志如下

Failed to resolve: com.crashlytics.sdk.android:crashlytics:com.crashlytics.tools.gradle

我的 gradle 文件在下面。

buildscript {
ext.kotlin_version = '1.2.61'
ext.zxing = '3.3.3'
ext.zxing_embedded = '3.6.0'
ext.support_library = '28.0.0'
ext.google_services = '4.2.0'
ext.firebase = '16.0.5'
ext.fabric_tools_gradle = '1.27.0'
ext.crashlytics = '2.9.6'

repositories {
maven {url 'https://maven.fabric.io/public'}
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.gms:google-services:$google_services"
classpath "io.fabric.tools:gradle:$fabric_tools_gradle"
}

}

allprojects {
repositories {
maven {url 'https://maven.google.com/'}
google()
jcenter()
}
}

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


apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "xxxxx.xxxxxxxxx" //blind
minSdkVersion 16
targetSdkVersion 28
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
debug {
minifyEnabled true
useProguard true
shrinkResources false
proguardFile getDefaultProguardFile('proguard-android.txt')
proguardFile 'proguard-rules.pro'
proguardFile 'proguard-zxing.pro'
proguardFile 'progurad-support-design.pro'
}

release {
minifyEnabled true
useProguard true
shrinkResources false
proguardFile getDefaultProguardFile('proguard-android.txt')
proguardFile 'proguard-rules.pro'
proguardFile 'proguard-zxing.pro'
proguardFile 'progurad-support-design.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

//kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

//test
// testImplementation 'junit:junit:4.12'
// androidTestImplementation 'com.android.support.test:runner:1.0.0'
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

//layout
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

//support library
implementation "com.android.support:appcompat-v7:$support_library" // Version 23+ is required
implementation "com.android.support:design:$support_library"

//zxing
implementation("com.journeyapps:zxing-android-embedded:$zxing_embedded") { transitive = false }
implementation "com.google.zxing:core:$zxing"

//permission check util
implementation 'rebus:permission-utils:2.0.7'

// Add dependency
implementation "com.crashlytics.sdk.android:crashlytics:$crashlytics"

//firebase
implementation "com.google.firebase:firebase-core:$firebase"
}

apply plugin: 'com.google.gms.google-services'

最佳答案

我不确定,但试试这个,然后告诉我是否成功

改变这个

ext.crashlytics = '2.9.6'

为此

ext.crashlytics_version = '2.9.6'

并使用它

 implementation "com.crashlytics.sdk.android:crashlytics:$crashlytics_version"

关于android - 我该如何解决? `Failed to resolve: com.crashlytics.sdk.android:crashlytics:com.crashlytics.tools.gradle`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53693318/

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