[Mono-bugs] [Bug 655342] New: System.InvalidOperationException When Inheriting From IntentService

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 22 14:56:11 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=655342

https://bugzilla.novell.com/show_bug.cgi?id=655342#c0


           Summary: System.InvalidOperationException When Inheriting From
                    IntentService
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: x86-64
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Tools
        AssignedTo: mkestner at novell.com
        ReportedBy: danomania at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=401642)
 --> (http://bugzilla.novell.com/attachment.cgi?id=401642)
Solution that demonstrates problem

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12)
Gecko/20101026 Firefox/3.6.12

When inheriting from Android.App.IntentService, an
System.InvalidOperationException is thrown with message: The type '[TypeName]'
needs to have a public default constructor.

Intellisense in Visual Studio correctly detects the available constructors:
IntentService(string name)
IntentService(IntPtr handle)

The error occurs when the project is built.


Reproducible: Always

Steps to Reproduce:
1. Create a new MonoDroid Application
2. Add a new class and inherit from IntentService
3. Build project
Actual Results:  
Error    1    System.InvalidOperationException: The type
'IntentServiceSandbox.MyIntentService' needs to have a public default
constructor.    C:\Users\Dan\Documents\Visual Studio
2010\Projects\IntentServiceSandbox\IntentServiceSandbox\monodroid   
IntentServiceSandbox


Expected Results:  
Successful compilation

-- 
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