【问题标题】:Plugin with id 'crashlytics' not found issue with Android studio latest pluginid 为“crashlytics”的插件未发现 Android Studio 最新插件存在问题
【发布时间】:2014-07-16 09:33:21
【问题描述】:

对于以下 gradle 构建配置,我面临 Error:(11, 0) Plugin with id 'crashlytics' not found 错误。

buildscript {
    repositories {
        maven { url 'http://download.crashlytics.com/maven' }
    }

    dependencies {
    }
}

apply plugin: 'android'
apply plugin: 'crashlytics'
apply plugin: 'hugo'


repositories {
    maven { url 'http://download.crashlytics.com/maven' }
}




android {
    compileSdkVersion 19
    buildToolsVersion '20.0.0'

    defaultConfig {
        applicationId "com.wiznsystems.android"
        minSdkVersion 15
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/smartconfiglib.jar')
    // You must install or update the Support Repository through the SDK manager to use this dependency.
    compile 'com.crashlytics.android:crashlytics:1.+'
    compile 'com.android.support:support-v4:19.+'
    compile 'com.google.android.gms:play-services:4.2.42'
    compile 'com.jakewharton.hugo:hugo-runtime:1.1.0'
    compile 'com.squareup.retrofit:retrofit:1.+'
    compile 'com.android.support:appcompat-v7:19.+'
    compile 'com.jakewharton:butterknife:5.+'
    compile 'de.greenrobot:eventbus:2.2.1'
    compile 'fr.avianey:facebook-android-api:+@aar'
    compile 'com.squareup.picasso:picasso:2.+'
    compile 'de.keyboardsurfer.android.widget:crouton:1.8.4'
    compile project(':apptentiveandroidsdk')
}

我做错了吗?或者是否有任何解决方法可以构建它?

【问题讨论】:

  • 我现在也有同样的问题。我认为这是暂时的问题。我希望如此)

标签: android-studio android-gradle-plugin crashlytics


【解决方案1】:

我有同样的问题。我最终做的是将命令的顺序与 Crashlytics 提供的内容保持一致。我有类似你的东西,但它没有工作。一旦将其更改为那里文档的确切顺序,它就起作用了。这是我现在的样子。希望这可以帮助。

buildscript {
  repositories {
      mavenCentral()
      maven { url 'http://download.crashlytics.com/maven' }
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:0.12.+'
      classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
  }
}

apply plugin: 'android'
apply plugin: 'crashlytics'

repositories {
  mavenCentral()
  maven { url 'http://download.crashlytics.com/maven' }
}

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:19.+'
  compile 'com.android.support:support-v4:19.0.+'
  compile 'com.squareup.picasso:picasso:2.3.2'
  compile 'com.joanzapata.android:android-iconify:1.0.6'
  compile 'com.github.hotchemi:android-rate:0.3.1'
  compile 'com.loopj.android:android-async-http:1.4.5'
  compile 'com.github.satyan:sugar:1.3'
  compile 'com.crashlytics.android:crashlytics:1.+'
}

android {
  compileSdkVersion 19
  buildToolsVersion "20"

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

【讨论】:

    【解决方案2】:

    尝试通知类路径依赖:

    buildscript {
        repositories {
            maven { url 'http://download.crashlytics.com/maven' }
        }
    
        dependencies {
            classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
        }
    }
    

    【讨论】:

      【解决方案3】:

      在与此错误作斗争数小时后,我最终删除了主目录中的“.gradle”文件夹,问题消失了!因此,如果您遇到此问题,请尝试先删除 .gradle 文件夹,然后重新构建您的项目。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-01-02
        • 2017-10-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多