日常安慰自己:
你是最棒的!方正沒人會看到這句話。
使用環境:
在集成greenDao的時候,各方面都以爲沒有問題但是!
GreenDao:Error:(18, 8) 錯誤: FlyLocationBeanDao不是抽象的, 並且未覆蓋AbstractDao中的抽象方法hasKey(FlyLocationBean)
Dao中有hasKey方法我沒有集成?
但是我集成了之後,一運行直接就消失了?
慌得一批
解決方法:
項目下的build.gradle (謹記: 不是app下的build.gradle)
兩句“這一句”加上,然後運行
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()//這一句
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven{url "https://jitpack.io"}//這一句
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
應該解決了
如果還沒有解決歡迎來訪
QQ羣:88627109