Reputation: 21
I have an android application consisting of a library project that contains the source code. I then have two additional projects, that are used to manage a pro, and lite version of the app.
I have been unable to get robotium to load the class files from either of my proxy apps(pro and lite, which reference the library via a module reference), or the library itself. I have tried a bunch of different class names, and references, but the test project fails below.
public MainTest() {
super("com.joe.app.lib", Main.class);
}
I haven't found any discussion here about testing with library projects in android. Looking for advice.
Error msg
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.joe.app.tests/com.job.app.tests.MainTest}: java.lang.ClassNotFoundException: com.joe.tests.MainTest in loader dalvik.system.PathClassLoader[/data/app/com.joe.app.tests-1.apk]
Upvotes: 2
Views: 858
Reputation: 17495
In case you haven't found a solution yet or others are getting to this question due to similar errors after the last the adt update.
In Project Properties
of your Test Project go to item Java Build Path
and select tab Order and Export
. There you'll have to check the project you're testing against so it's properly exported.
For latest ADT you also have to have the Android Private Libraries
exported in your projects.
Upvotes: 0