Question: I want to execute a Java class to test pieces of an Android application's functionality (from a Java Module) to read/write data to file. If I execute within the Android module, I get Stub! errors (Android SDK). If I install or emulate, it is very slow (I'm only testing a specific piece).

If I include the Android module as a Module Dependency, IntelliJ still builds the Android files and I get a Stub! error during execution. But if I only include the classes directory and mark them as Provided, I get errors when Log. is called.

Is there a way to run simple Java tests on components of an Android application (not using Activity, etc), using the Java SDK and not building Android specific files?

Answer: 
Seems to be fixed in later releases of IntelliJ 10 - hadn't been able to reproduce the issue
You need to either instrument your tests and run them on a device (or emulator), or use [Roboelectric](http://pivotal.github.com/robolectric/), it provides replacements for the SDK jar stubbed classes.