我创建了一个包含广播接收器实现的 Android 类库:
[IntentFilter(new string[] { "com.google.android.gcm.intent.RETRY" }, Categories = new string[] { "@PACKAGE_NAME@"})]
public class GcmBroadcastReceiver : BroadcastReceiver
{
public GcmBroadcastReceiver ()
{
}
}
当我尝试构建时收到消息“'Android.Content.IntentFilter' 不是属性类”
我需要做什么来构建这个版本?
最佳答案
您需要为 Android.Content 和 Android.App 添加 using 语句
关于android - Xamarin - ‘Android.Content.IntentFilter' 不是属性类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29824275/