问题
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:
回答1:
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.
回答2:
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
来源:https://stackoverflow.com/questions/9762265/why-cant-i-add-mopub-android-sdk-as-library