[Mono-bugs] [Bug 691839] Cannot package when creating a new Application property in a base activity class

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Sep 22 16:11:49 EDT 2011



Jonathan Pobst <jpobst at xamarin.com> changed:

           What    |Removed                     |Added
                 CC|                            |jpobst at xamarin.com

--- Comment #3 from Jonathan Pobst <jpobst at xamarin.com> 2011-09-22 20:11:47 UTC ---
With 2.0, we have the error reporting working better so that you can see the
actual error:

The "GenerateJavaStubs" task failed unexpectedly.
 System.InvalidOperationException: The Name property must be a fully qualified
'package.TypeName' value, and no package was found for 'CustomApplication'.

    at Xamarin.Android.Tasks.JavaTypeInfo..ctor(TypeDefinition type, String
outerType) in C:\Users\Jonathan\Documents\Visual Studio
2010\Projects\monodroid\tools\msbuild\Generator\JavaTypeInfo.cs:line 63
    at Xamarin.Android.Tasks.JavaTypeInfo..ctor(TypeDefinition type) in
C:\Users\Jonathan\Documents\Visual Studio
2010\Projects\monodroid\tools\msbuild\Generator\JavaTypeInfo.cs:line 26
    at Xamarin.Android.Tasks.Generator.CreateJavaSources(List`1 javaTypes,
String outputPath) in C:\Users\Jonathan\Documents\Visual Studio
2010\Projects\monodroid\tools\msbuild\Generator\Generator.cs:line 14
    at Xamarin.Android.Tasks.GenerateJavaStubs.Execute() in
C:\Users\Jonathan\Documents\Visual Studio
2010\Projects\monodroid\tools\msbuild\Tasks\GenerateJavaStubs.cs:line 64

The problem is that we build the package name using Namespace.ApplicationName,
and you don't have this in a namespace.  The workaround is to put the
CustomApplication inside a namespace.

As to fixing the bug, I don't know if there is something we can do
automatically like grab the DefaultNamespace, or we just need to add a better
error message explaining that a namespace is required.

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

More information about the mono-bugs mailing list