2017-03-10 110 views

回答

0

您可以嘗試排除依賴關係。

compile('compile 'com.jakewharton:butterknife:8.5.1') { 
    exclude group: 'com.android.support', module: 'support-v4' 
} 

此錯誤的原因是您的項目和butterknife都依賴於android支持庫,但所使用的版本不同步。

0

正如Modge回答的,它在編譯檔案文件中的butterknife庫時存在衝突。但是,您必須排除support-compat模塊以避免衝突。您可以按照以下方式定義您的依賴關係。

dependencies { 
... 
    // Support version library may differ from yours 
    compile 'com.android.support:support-v4:22.2.1' 
    compile ('com.jakewharton:butterknife:8.5.1') { 
     exclude module: 'support-compat' 
    } 
... 
}