2017-09-26 70 views
3

Fabric成功地處理了我的項目。突然有一天,它開始給我錯誤「Error:(18, 0) Plugin with id 'io.fabric' not found」。我檢查了所有內容,但它已正確整合。請幫忙給解決錯誤:(18,0)未找到id爲'io.fabric'的插件

外的build.gradle

buildscript { 
    repositories { 
     maven { url 'https://maven.fabric.io/public' } 
    } 

    dependencies { 

     classpath 'io.fabric.tools:gradle:1.+' 
    } 
} 

內的build.gradle

apply plugin: 'com.android.application' 
    apply plugin: 'io.fabric' 

    repositories { 
     maven { url 'https://maven.fabric.io/public' } 
    } 

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

    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 

    } 

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

我們應該如何幫助這裏?你至少可以分享你的build.gradle –

回答

2

您需要在外部的build.gradle文件中添加類路徑這樣

dependencies { 
    classpath 'io.fabric.tools:gradle:1.+' 
} 

完整外部build.gradle文件如下所示

buildscript { 
    repositories { 
    maven { url 'https://maven.fabric.io/public' } 
    } 

    dependencies { 
    // These docs use an open ended version so that our plugin 
    // can be updated quickly in response to Android tooling updates 

    // We recommend changing it to the latest version from our changelog: 
    // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin 

    // Add more class path here as per your project requirement 
    classpath 'io.fabric.tools:gradle:1.+' 
    } 
} 
+1

是這樣設置的。這是解決此錯誤的解決方案。 – InsaneCat

+0

我已經添加了所有這些行以及apply插件:'io.fabric'。但是此行發生錯誤。 –

+0

Post ur外部build.gradle文件有問題請 –

相關問題