Closed rayastar closed 1 year ago
It's been 2 years, but I'm leaving my solution here in case someone else has the same issue.
In recent versions of Android Studio, the IDE will refuse have to run Java main() methods if the module is not declared as a pure Java library.
In your build.gradle file of the generator module, if you have apply plugin: 'com.android.library'
, change it to:
plugins { id 'java-library' }
And remove all Android blocks from the file. After applying these changes it should look like this:
plugins {
id 'java-library'
}
dependencies {
implementation "org.greenrobot:greendao-generator:$greendao_version"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
You should be able to run the generator without any issues.
@silvagoncalodev Thanks for sharing! Closing this as it's really outdated.
Hello. I have greendao generator in my project and it worked retty good. But today it doesn't work. It's very abnormal, because it's earlier worked . I download example from rep, and it's doesn't work too. The same error. Can you help me?
my source set: