Why do all of my tests fail with the exception java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission?
This most frequently happens if your phone or emulator is displaying the lock screen when you run your tests. Unlock the device and then run your tests again.
When I run my test cases, I get a cryptic error in the console that says "A fatal error has been detected by the Java Runtime Environment", or something similar, and the tests don't run.
Make sure that you choose Run As... > Android JUnit Test, not Run As... > JUnit Test. Even if you're only testing your data model and not a screen, if it's an Android application project, all tests must be executed on the emulator/device. (This is because, in a nutshell, Android uses a different executable format that desktop Java does not understand.)