Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kotlin] Table null needs to define at least one column #596

Closed
simc opened this issue Jan 31, 2016 · 4 comments
Closed

[Kotlin] Table null needs to define at least one column #596

simc opened this issue Jan 31, 2016 · 4 comments

Comments

@simc
Copy link

simc commented Jan 31, 2016

I get the following error while building my app (it is written in Kotlin). But when I delete the build folder in Android Studio before building everything is fine.

When I build the next time, I get the error again.

:myapp:compileReleaseJavaWithJavac
Error:*==========*
  Table null needs to define at least one column
  *==========*
Error:*==========*
  Table null needs to define at least one primary key
  *==========*
Error:*==========*
  Table null needs to define at least one column
  *==========*
Error:*==========*
  Table null needs to define at least one primary key
  *==========*

Warning:The following options were not recognized by any processor: '[kapt.kotlin.generated]'
Error:Execution failed for task ':myapp:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.```
@Amagi82
Copy link

Amagi82 commented Feb 2, 2016

Same issue here. Haven't found a workaround yet besides using java for the database classes

@agrosner
Copy link
Owner

this is a Kotlin issue, that apparently is still not solved. (http://blog.jetbrains.com/kotlin/2015/06/better-annotation-processing-supporting-stubs-in-kapt/). I tested this and found writing it in Kotlin appears to work in the IDE, but when you reference those generated java files from DBFlow in Kotlin, the Kotlin compiler cannot find the generated classes.

@agrosner agrosner changed the title Table null needs to define at least one column [Kotlin] Table null needs to define at least one column Feb 29, 2016
@ubuntudroid
Copy link

Is it one of these Kotlin issues causing the problems? KT-10352, KT-8733, KT-7277

Some of them are already closed, although the issues still persist. Doesn't seem they are actively working on that at the moment. What a shame. The model classes looked so clean when defined in Kotlin. Back to verbose Java.

@agrosner
Copy link
Owner

agrosner commented May 4, 2016

@ubuntudroid no this is a different kind of issue (https://youtrack.jetbrains.com/issue/KT-11978). closing this b/c this is not dbflow issue.

@agrosner agrosner closed this as completed May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants