0

I want to group classes together in different packages in my android project I am writing in eclipse. Similar the the MVC approach.

I was wondering how I would go about this, I tried it and I am getting errors from the manifest, how do I successfully add more than one package?

Thanks,

Ben

Ben Taliadoros
  • 7,003
  • 15
  • 60
  • 97

1 Answers1

1

Could you post your manifest? It might help get to the bottom of the issue.

Also, take a look at this thread, as it seems to be what you want.

Basically, create subpackages for each aspect. So they would be

com.yourapp.model
com.yourapp.view
com.yourapp.controller

and your manifest would look like

<manifest package="com.yourapp" . . . >
    <application . . .>
        <activity android:name=".model.Activity1" . . . />
        <activity android:name=".view.Activity2" . . . />
        <activity android:name=".controller.Activity3" . . . />
    </application>
</manifest>

But you might not have activities in each of these packages, that's just to show you how you could access them if you need to.

Community
  • 1
  • 1
skynet
  • 9,898
  • 5
  • 43
  • 52
  • It works now, although the database has been emptied, not important data but strange, any idea why this may have happened? also I haven't needed to specify the package name in the andrtoid:name attribute, just the class name seems fine. – Ben Taliadoros Oct 28 '11 at 16:07
  • You should post another question about that – skynet Oct 28 '11 at 16:10