I have 2 Android library projects. LibraryA and LibraryB.
I have a project called project1 which needs to reference classes and stuff that are in LibraryA and LibraryB.
I am using the auto generated Ant script inside eclipse to build all the projects. Note: that i have removed all other builders from each of the projects and only using the Ant builder.
When i run the build script for project1 with the following targets “clean,debug”, eclipse's console says BUILD SUCCESSFUL. HOWEVER, if i look at the code inside eclipse there are lots of error lines and x’s in the code saying that the imports cannot be resolved and numerous other errors. Basically it is telling me the references to the library projects is not there. It is also telling me the R's cannot be resolved either.
I thought ADT17 was going to fix this issue but it still persists. Am i doing something wrong? How can i solve this issue, so that eclipse allows the references and everything builds fine?
Running the application on the phone is working.
# The project.properties file for project1
target=android-10
android.library.reference.1=../LibraryA
android.library.reference.2=../LibraryB
I have a dirty fix that solves this problem, but i would like a much cleaner solution that is automatic and does not require editing the auto generated build.xml that android generates. It seems like this type of thing should be working out of the box.
I figured out the problem.
genwas not included as asrcfolder for the project. Once i includedgenas a source folder all theRreferences started working.I do NOT have the jars in my
libsfolder for the project.My “dirty solution” i mentioned earlier is adding a
post-compiletarget and taking theclasses.jarthat is generated during build and renaming it to"TheProjectName".jarand then the project will see the jar file references.The “dirty solution” is what i was doing pre-ADT17 and was hoping to avoid in ADT17, but it seems like this issue is still not resovled. If anyone has any suggestions on how to fix that problem, please let me know.