Share Coding

Tutorials, Problems, Stuffs …

Category Archives: DBFlow

Android DBFlow multiple condition query with ‘LIKE’ operator

In the following case, contain some features:

  1. ConditionGroup to handle multiple condition
  2. LIKE operator with “%”, means the keyword can have words in-front or after it

Read more of this post

Error:Execution failed for task ‘:app:compileDebugJavaWithJavac’.

Error:Execution failed for task ‘:app:compileDebugJavaWithJavac’.
> java.lang.UnsupportedOperationException: cannot unbox java.lang.String


This error message I have got many times after I created a new Table in DBFlow.

That is because using a String as a auto increment Primary Key.

@Unique(onUniqueConflict = ConflictAction.REPLACE)
@PrimaryKey(autoincrement = true)
public int id;