I’m working on an Android project. I need to use a library (libs/maps.jar) to compile the code. Unfortunately, the .jar I’ve been provided only contains stubs with no real implementation. I need to be able to build an .apk that doesn’t include the .jar (Amazon Maps) since it will be provided by the system.
In IntelliJ you can mark a library as “Provided”, so that it doesn’t get compiled into the apk. How can you achieve the same thing in Eclipse?
As a follow up, how can I accomplish the same thing with Ant?
You should be able to add your maps.jar to the project build path. You could do this by going to Project > Properties > Java Build Path > Libraries and then add that jar as an external jar. That should allow your project to compile and not include the jar.
As for Ant, you would pretty much do the same thing. You would simply include that jar file in your classpath tag for the build task. http://ant.apache.org/manual/using.html (search for classpath).
Then whatever you actually need to have deployed with your .apk, just be sure to include that in your deploy actions.