My Problem any one help me?

ilyasilyas USMember

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB4018: The "GenerateJavaStubs" task failed unexpectedly.
System.InvalidOperationException: The type 'BillCheker.WebViewActivity' needs to have a public default constructor.
at Xamarin.Android.Tasks.ManifestDocument.Merge(List1 subclasses, List1 selectedWhitelistAssemblies, Boolean embed, String bundledWearApplicationName, IEnumerable`1 mergedManifestDocuments)
at Xamarin.Android.Tasks.GenerateJavaStubs.Run()
at Xamarin.Android.Tasks.GenerateJavaStubs.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() (MSB4018) (BillCheker)

Best Answer

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    Accepted Answer

    @ilyas - the error is stating that you need to have a default public constructor in WebViewActivity.

    As such please make sure you have a public constructor with no parameters for the WebViewActivity.

    public WebViewActivity()
    {
    
    }
    

Answers

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    Accepted Answer

    @ilyas - the error is stating that you need to have a default public constructor in WebViewActivity.

    As such please make sure you have a public constructor with no parameters for the WebViewActivity.

    public WebViewActivity()
    {
    
    }
    
  • oliveiravitor3oliveiravitor3 BRMember ✭✭

    Thanks @AdamP .

    It worked for me.

    Ps.: Is not this a weird error?

Sign In or Register to comment.