ButterKnife 報Required view 'hello' with ID 2131427413 for field 'hello' was not found

Required view 'hello' with ID 2131427413 for field 'hello' was not found

就是報上面這個奇怪的錯,明明github上的提示添加什麼包的,什麼的都添加進去了

然後我就看了其他什麼的開源項目的什麼的,然後就發現了一個不太一樣的地方

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        classpath 'com.frogermcs.androiddevmetrics:androiddevmetrics-plugin:0.4'
    }
}

上面這個build.gradle是添加在project裏面的build.gradle。
我之前自作聰明,自己在app module裏面的build.gradle寫了一個。現在改在project裏面突然就好了,應該是這個問題

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章