One last word of advice, if you are creating a standard jar file, then your project (for that code) shouldn't be an Android project but a regular java project.
-Kitzy On Mar 2, 8:08 am, Dori <[email protected]> wrote: > This video may help you with referencing the jar from an android > project > > http://www.screencastcentral.com/public/yt3334.cfm > > You can export code as a jar file in eclipse by selecting your project > and going to File -> Export -> Select Java folder -> Jar file...then > import that into your projects which you want be able to access the > jar file from... > > Hope it helps! > > Dori > > On Mar 1, 6:38 pm, Mitch <[email protected]> wrote: > > > > > Okay, so one option is to create a .jar file (somehow) and then > > (somehow) include that inside Eclipse. I may need to figure out how > > to set up the build dependencies as well. > > > I'll look into that. Seems reasonable and at least a direction to > > try. If anyone has other suggetions or can fill in the "somehow"s, > > that would be good too. > > > Thanks. Mitch > > > On Mar 1, 10:05 am, Mark Murphy <[email protected]> wrote: > > > > Mitch wrote: > > > > I'm not sure what the options are, which is the basis of my > > > > question. > > > > > I have some code that is general (geometry calculations, Android UI > > > > helpers, ... etc). I would like to have multiple applications have > > > > access to the same code. I don't need this done at runtime, but I do > > > > know that is an option. I would like to start with sharing the source > > > > and then move to sharing the compiled code (.class?). I don't know > > > > how to set up the project to do this. I guessed by creating a new > > > > Java Project and leaving off the Activity, which worked as far as the > > > > Eclipse environment was concerned (no warnings, errors, etc), but when > > > > it runs, it's ugly and unhelpful as to what's wrong. Even debugging > > > > doesn't help. > > > > > I assume there's a model here for sharing code. Source sharing, > > > > compiled code sharing, runtime sharing, ... I simply don't know what > > > > the options are for sharing. > > > > You need to create a project that creates a JAR file as its target, then > > > use that JAR file in other projects. I am sure there is some magic > > > incantation, probably involving pentagrams drawn in chicken blood, to > > > get Eclipse to do that. :-) Outside of Eclipse, using Ant, it's about a > > > 15 second operation once you have the pattern in hand. > > > > -- > > > Mark Murphy (a Commons > > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > > Android Training...At Your > > > Office:http://commonsware.com/training-Hidequoted text - > > > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

