I have tried to run the exmaple project in AndroidStudio and it works perfectly. However, I want to try the java-plain testing project in IntelliJ again and here is the source code.
It can build successfully, but I encountered a NullPointException like #205 , because of ToOne<Note> and ToMany<Note> are both null.

I feel so much confused.
Please try to run the Gradle target, like ./gradlew java-main:run - AndroidStudio is not good with Java projects.
I create a new project in IntelliJ, not AndroidStudio. Here is source code.
I will have a more detailed look later, but I guess this is because by default IntelliJ uses its own build tools and not Gradle. Try to enable the delegate actions to Gradle option in File | Settings | Build, Execution, Deployment | Build Tools | Gradle | Runner.
Edit: yeap, confirmed project linked above works this way.
-ut
@greenrobot-team You are right. I found the cause of the problem. Thank you
How to enable delegating actions in newest Android Studio? There is no such option anymore
@TKolbusz Android Studio does this by default.
Anyhow, if you are writing a plain Java project (like op) I recommend using IntelliJ IDEA instead as Android Studio is optimized for Android projects.
-ut