Skip to content

ERROR #43775

@SayedHussein1

Description

@SayedHussein1

Type of issue

Code doesn't work

Description

events.AddAndroid(android =>
{
android.OnCreate((activity, bundle) =>
{
var action = activity.Intent?.Action;
var data = activity.Intent?.Data?.ToString();

     if (action == Android.Content.Intent.ActionView && data is not null)
     {
         activity.Finish();
         System.Threading.Tasks.Task.Run(() => HandleAppLink(data));
     }
 });

});
AddAndroid
'type' does not contain a definition for 'name' and no accessible extension method 'name' accepting a first argument of type 'type' could be found (are you missing a using directive or an assembly reference?).

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs1061?f1url=%3FappId%3Droslyn%26k%3Dk(CS1061)

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/compiler-messages/cs1061.md

Document Version Independent Id

df4263c1-477a-3c32-9abe-3fcb850e6c1b

Article author

@BillWagner

Metadata

events.AddAndroid(android =>
{
android.OnCreate((activity, bundle) =>
{
var action = activity.Intent?.Action;
var data = activity.Intent?.Data?.ToString();

     if (action == Android.Content.Intent.ActionView && data is not null)
     {
         activity.Finish();
         System.Threading.Tasks.Task.Run(() => HandleAppLink(data));
     }
 });

});
AddAndroid
'type' does not contain a definition for 'name' and no accessible extension method 'name' accepting a first argument of type 'type' could be found (are you missing a using directive or an assembly reference?).

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions