Error:(4, 0) Plugin with id 'com.jakewharton.butterknife' not found.
如果是在app資料夾下的build.gradle裡直接依賴不會有事,但是如果放在Library 包的時候,需要在專案的build.gradle裡面寫上:
classpath 'com.jakewharton:butterknife-gradle-plugin:8.6.0'
同時也需要在settings.gradle裡面寫上:
include ':app','library'
這樣,通過在app專案下的build.gradle裡面的dependencies {}裡新增如下程式碼:
compile project(':library')
就表示app可以使用Library裡面的第三方開源庫。一般第三方包都可以放在library裡面,然後app直接可以使用,butterknife比較特殊,除了放在library的gradle裡面,還需要在app的gradle裡面也要加進去,才可以兩邊都可以使用,如果不在app的gradle裡面加的話,app裡面用不了。A包含B,B包含C,A可以用B和C的所有東西,B可以用C的所有東西,但不能用A的東西,C只能用自己的東西。同時,如果遇到bug,還有一個要注意的是,可以去github上面去看一下使用方法和注意事項。
相關文章
- Android Studio專案匯入之後出錯:Error:(1, 0) Plugin with id 'com.android.application' not found.AndroidErrorPluginAPP
- Plugin with id 'com.android.application' not found.PluginAndroidAPP
- 排查qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.QTPluginPlatform
- 釋出android apk,Error running app: No target device found.AndroidAPKErrorAPPdev
- build Error -- extract-text-webpack-pluginUIErrorWebPlugin
- [ERROR] Can't open the mysql.plugin tableErrorMySqlPlugin
- ubuntu進行make時報錯error: Neither flex nor lex was found.UbuntuErrorFlex
- ERROR 1524 (HY000): Plugin is not loadedErrorPlugin
- PHP 5.4 編譯 configure: error: libXpm.(a|so) not found.PHP編譯Error
- MySQL報錯Table 'plugin' is read only [ERROR] Can't open the mysql.plugin table.MySqlPluginError
- 解決Parameter '__frch_item_0' not found. Available parameters 問題AI
- 記錄Windows failed fast startup with error status 0xC00000D4.WindowsAIASTError
- webapck4 玄妙的 SplitChunks PluginWebPlugin
- vipca報錯 Error 0PCAError
- CMake Error at cmake/readline.cmake:85 (MESSAGE): Curses library not found.Error
- IDEA Plugin 開發探索IdeaPlugin
- (Error -1170 @ 0x0) Unable to access the DAP)Error
- Check failed: status == CUDNN_STATUS_SUCCESS (4 vs. 0) CUDNN_STATUS_INTERNAL_ERRORAIDNNError
- No suitable application records were found. Verify your bundle ideUIAPPIDE
- capt 與 Android Gradle PluginAPTAndroidGradlePlugin
- Flutter plugin:flutter_qq_bridgeFlutterPlugin
- Error:程式包android.support.v4.app不存在;Error:找不到類FragmentActivityErrorAndroidAPPFragment
- Opiino: Attach Failed! Error=-1 Ifvp=0AIError
- express: command not found.Express
- [ERROR] mysqld: Can‘t open shared library ‘/usr/local/mysql/lib/plugin/validate_password.so‘ (errno:ErrorMySqlPlugin
- nginx之 [error] 6702#0:XXX is forbidden (13: Permission denied)NginxErrorORB
- ?WARNING: ASM communication error: op 0 state 0x0 (15055)ASMError
- webpack4 系列教程(十四):Clean Plugin and Watch ModeWebPlugin
- ERROR 1054 (42S22): Unknown column 'plugin' in 'mysql.user'ErrorPluginMySql
- Error parsing XML: An invalid XML character (Unicode:0x1f) was foundErrorXMLUnicode
- SP2-0642: SQL*Plus internal error state 2130, context 0:0:0SQLErrorContext
- error code 0x534. [SQLSTATE 42000] (Error 15404)).ErrorSQL
- configure: error: xml2-config not found. Please check your libxml2 installationErrorXML
- wmi provider error 0x800742a2 :: MSSQL instance can not startIDEErrorSQL
- Andorid Studio NDK開發:Experimental PluginPlugin
- Android Unity Plugin 開發指南(轉載)AndroidUnityPlugin
- redis報錯Windows error 0x70RedisWindowsError
- Error 600 encountered while recovering transaction (10, 0)ErrorWhile