Question

I am working on a custom Android library. I start off with a java project (in Eclipse) with another UI testing Android project.

In my UI testing project, I reference the library project in build path, and everything is good and I can test the library codes in the UI.

Later on, I decided I need to have the 'Gen' code (for custom styles attributes), so I try to change my library to an Android project (via Android-tools -> convert.. ), and disasters happens! After fixing up all the compile time problems, it finally 'let' me start the UI testing application, and bangs! When I try to create any objects from the library class, it said (in the Log) that Class not found.

Two questions:

  1. Any idea how to fix this? I tried but seems it is for referencing another .apk that need to install separately.

  2. If I just keep it to be java project (not android) for my library, can I use the resource generator? and how?

PS: the dependency (my library) is installed before the UI test application, according to the Console of Eclipse said.

Update: I tried to compile the library project to jar and reference it from the UI testing, and in this way, it works. But I don't want to use this approach since it is very slow in terms of testing.

Was it helpful?

Solution 2

Finally I found the answer to my own question. This is actually mentioned in official documentation.

OTHER TIPS

for those who are doing same mistake like me

when library project is an android project got to

properties > android > click add button at bottom of the popup inside library section

and add project, instead of

properties > java build path > project > add

later approach is for pure java projects only .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top