I have three android projects like this,
Library
ProjectA
ProjectB
I have used admob’s jar file in the Library,
ProjectA and B use the Library project as reference, Library.jar
The admob jar is not directly added in the Project A or B. I was hoping since A and B are referencing the Library project and Library references admob jar, I could access the classes of admob jar in my projects A and B without explicitly using the admob jar in A/B.
Project A/B do not have specific code for classes related to admob jar. The related code is only in library and that code is meant to run When my Projects are compiled.
So what happens is I get runtime crash saying class not found. If I add admob jar to my Projects they there is no runtime problem.
Please advise me what is the correct way of doing it..
Thanks,
Found the answer, in project properties -> Java build path -> order and import , Checked the admob jar file and it worked 🙂