So I decided to split my project(for lite/full versioning) today. I packed the main code into library project, added two new shell projects, and linked them together. All of that worked fine, and I can run either the lite or full version with no problem.
However, I'm having a problem with Mopub integration in the library project. I followed their little tutorial, which is very simple. My problem is the build order for packages within a project. As part of the install process(shown here), it creates a com.mopub.mobileads
package in my project.
This is my first time having a problem with multiple packages within a project, but for some reason, Eclispe insists that my import:
import com.mopub.mobileads.MoPubView;
cannot be resolved, specifically the com.mopub
part.
My only guess is that when I compile, it tries to compile my package first, and it's just not seeing the Mopub package yet. However, if that's the case, I cannot for the life of me figure out how to change the build order of individual packages. If I wanted to change the order of projects, I'd be set, since that's simple. Google hasn't been much help to me in this either.
I know I could just add the source files into my own package, fix their imports to match, and have th whole problem gone, but that's an ugly hack I'd rather avoid.
I know I'm just missing something stupid, but I'm just not seeing it.
The errors it gives are pointed at the import line, and every line that references MoPubView, which is exactly what you'd expect:
(error x 5)MoPubView cannot be resolved to a type mainAct.java
R.id.adView cannot be resolved mainAct.java
The import com.mopub cannot be resolved mainAct.java
You can try to change how Eclipse responds to build path problems.
Access the project properties (right click your project => Properties
or Command + I on mac) and select Java Compiler
=> Building
from the left pane. On the right pane, Enable project specific settings
and modify the options under Build path properties
.
Assuming you don't actually have circular dependencies that need to be corrected, this should be sufficient.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With