Xamarin - "Android.Content.IntentFilter" is not an attribute class

Ive created an Android class library that includes a broadcast receiver implementation:

[IntentFilter(new string[] { "com.google.android.gcm.intent.RETRY" }, Categories = new string[] { "@PACKAGE_NAME@"})]
public class GcmBroadcastReceiver : BroadcastReceiver
{
    public GcmBroadcastReceiver ()
    {

    }
}

When I try to create Im, I get the message "Android.Content.IntentFilter" is not an attribute class "

What do I need to do to make this assembly?

+4
source share
1 answer

You need to add instructions for Android.Content and Android.App

+12
source

Source: https://habr.com/ru/post/1584263/


All Articles