title: Android Binding - top ancestor not found for nested type but is present in aar file
body: <p>I am trying to create a binding for a library, Firebase.Messaging since the current one on Nuget is not up to date, but one class out of this .aar library is not being added to the binding.
  This is the RemoteMessage.class.</p>
  
  <p>When I decompile the firebase-messaging.aar I do see the RemoteMessage.class present in the .aar file but when I add this .aar file to my bindingproject and run I get following error:</p>
  
  <blockquote>
    <p>Warning BG8604: top ancestor RemoteMessage not found for nested type Firebase.Messaging.RemoteMessage.Builder. (BG8604)</p>
  </blockquote>
  
  <p>This means that for instance the method<br>
  <code>public override void OnMessageReceived(RemoteMessage message)</code><br>
   will not be added to my binding because RemoteMessage is not found. I have tried to manually add this to my binding by using <code>&lt;add-note ...</code> but no luck so far. </p>
  
  <p>In my binding I have added references to firebase-common, firebase-iid, googleplayservices-basement, googleplayservices-tasks.</p>
  
  <p>Does anyone have an idea how I can force my binding to recognise the RemoteMessage class and add this to the binding?</p>
  
  <p>Edit: 
  What I do is create a new Xamarin Binding project for android, add the aar file to the Jars folder &amp; update the Metadata.xml</p>
  
  <p>This is the metadata.xml I am currently using:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;metadata&gt;
  &lt;!-- Rename Namespaces --&gt;
  &lt;attr path="/api/package[@name='com.google.firebase.messaging']" name="managedName"&gt;Firebase.Messaging&lt;/attr&gt;
  &lt;!-- Remove *zz* obfuscated classes, interfaces, methods, etc. --&gt;
  &lt;remove-node path="/api/package/class[contains(@name, 'zz')]" /&gt;
  &lt;remove-node path="/api/package/interface[contains(@name, 'zz')]" /&gt;
  &lt;remove-node path="/api/*/*/method[contains(@name, 'zz')]" /&gt;
  &lt;remove-node path="/api/*/*/field[contains(@name, 'zz')]" /&gt;
  
  &lt;!-- Fix params for some inherited parcelable types --&gt;
  &lt;attr path="/api/*/*/method[@name='createFromParcel']/parameter[@name='p0']" name="managedName"&gt;source&lt;/attr&gt;
  &lt;attr path="/api/*/*/method[@name='newArray']/parameter[@name='p0']" name="managedName"&gt;size&lt;/attr&gt;
  &lt;attr path="/api/*/*/method[@name='writeToParcel']/parameter[@name='p0']" name="managedName"&gt;dest&lt;/attr&gt;
  &lt;attr path="/api/*/*/method[@name='writeToParcel']/parameter[@name='p1']" name="managedName"&gt;flags&lt;/attr&gt;
  
  &lt;/metadata&gt;
  </code></pre>
  
  <p>Nothing in the additions folder, nor the EnumFields or EnumMethods, currently I am using the firebase-messaging-11.8.0.aar for this binding.</p>
  
  <p>After the Binding this is the result I see in the Assembly Browser:
  <a href="https://i.stack.imgur.com/Zx9zb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zx9zb.png" alt="Assembly Browser Image"></a></p>