[Mono-bugs] [Bug 665714] Default Package name is not correct?

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 19 23:08:20 EST 2011



Jonathan Pryor <jpryor at novell.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |jpryor at novell.com
         Resolution|                            |WONTFIX

--- Comment #1 from Jonathan Pryor <jpryor at novell.com> 2011-01-20 04:08:18 UTC ---
First of all, the auto-generated /manifest/@package value should be
mydroidapp.mydroidapp (all lowercase), because (1) mixed case makes the
filesystem gods cry and (2) aapt requires that a '.' be in the name.  I suspect
(2) is what's really killing you, because your namespace doesn't contain any
periods (it's just MyDroidApp), and thus isn't a suitable Android package name.

If you want to provide a custom package name, go to Project -> MyDroidApp
Properties, select the Android Manifest tab, and provide a value (containing
'.'s!) in the Package name textbox.

Alternatively, rename your assembly so that the filename contains spaces, e.g.
in Project -> MyDroidApp Properties, select the Application tab and change the
Assembly name textbox to My.Droid.App.  The generated /manifest/@package value
will have the lowercased version of the assembly name.

Secondly, most package names should always be lowercase.  The only exception I
know of to this is when you use [Register] on a type or use the
XxxAttribute.Name value (both of which you generally shouldn't use), thus your
Service should be "mydroidapp.Service".

Thirdly, you should be using custom attributes instead of mucking around with
XML generation, if at all possible (to preserve your sanity, among other


Thus, you should be doing:

    public class MyService : Android.App.Service { /* ... */ }

This will cause monodroid to automagically generation a <service/> element with
the appropriate //service/@android:name value, allowing it to be found.

In short, use the attributes and you won't need to worry about type name
discrepancies, as the AndroidManifest.xml value will be based upon the custom
attribute value.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list