Depends on what you mean by "package". I can put the code in the same file and that works. I did not try naming the package the same name. I did try creating the class inside the same project, which is named "package" in the Eclipse environment, but I think they are using the wrong name from what I read. I think "package" means a namespace type construct in Java from what I'm reading.
On Mar 1, 7:08 am, Kitzy <[email protected]> wrote: > For starters... can you create you class inside the same Android > package? > > As far as Android gos.. if you are going to have seperate Android > programs needing acess to the same, large, component, the component > itself will need to be handled by its own android project and access > from an activity, service, or broadcast reciever. Your other android > programs could then start an Intent to try to run it. You will also > have to have both programs installed on you device/emulator. (At least > that is the only way I think you can do it) > > -Kitzy > > On Feb 28, 10:24 pm, Mitch <[email protected]> wrote: > > > > > I'm using Eclipse. I created a new Android Project with the wizard > > and I can start the application in the emulator. I would like to > > create a class outside of the project (like it would be in a library) > > and call it. I created another Android Project without an Activity > > name and created a class with a "public static" method. All compiles, > > but it won't run. It just crashes without any helpful information. > > > Since there is no code inside my method, something else must be > > wrong. I assume I don't understand something about how things link in > > Java/Android (C++ programmer here). Can anyone explain or show me a > > tutorial on how to create a class in a library so I can call it from > > my project? Should I be creating a Android Project or something > > else? > > > Thanks, > > > Mitch- Hide quoted 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

