I’m trying to write test harness for part of my Android mapping application.
I would like to run the test as a Java console app under Eclipse. The only Google maps class that I require is a GeoPoint. I’ve included the maps.jar in the build path and imported the com.google.android.maps.GeoPoint so it compiles OK but generates a runtime error of :
“The JAR of this class file belongs to container ‘Google APIs[Android2.1 – update1]’ which does not allow modifications to source attachments on its entries”.
Is it possible to use this jar in a console app, and if so how?
No, sorry. I don’t even think the full class is in that JAR — that and
android.jarare just stubs AFAIK. The real implementation is on the device or emulator.You could create a wrapper around
GeoPointand use a local implementation for your testing.