I want to use MoPub for putting ads in my Android app. I have downloaded the required resources and set-up a library project (mopub-android-sdk) in Eclipse. Now I want to add this project as a library to my Android app. But when I try to do that it gives this error:
-
As a workaround I exported the project mopub-android-sdk as a jar and then added this jar to my Android project. This serves the purpose but there's one problem. As and when the MoPub SDK is updated I'll have to repeat this. But for now it is fine. – Balkrishna Rawool Mar 18 '12 at 21:53
2 Answers
Are the mopub-android-sdk files in the same parent folder as your project? This seems like the same problem addressed in this question/answer:
In eclipse, unable to reference an android library project in another android project
Place the referencing project in the same physical folder and see if the error persists.
To get around this, don't set up the mopub-sdk as a library project.
You can simply import it as a standard project.
Go to File > Import >Existing Projects Into Workspace, find the right project and click finish.
Right click your actual project and then click Build Path. Go to Link Source and then select the location of the project you just imported.
That should resolve the issue for you without requiring you to build a JAR.
-Franklin

- 11
- 1
-
I tried doing this. But then along with linking source folder, I had to also add stuff from resources folder (res) to my actual project which I didn't want. So I wouldn't prefer this option. Thanks for the answer though. – Balkrishna Rawool Mar 30 '12 at 23:30
-