title: Android autofill: dispatchProvideAutofillStructure() not laid out
body: <p>I have configured my app to support Android Oreo with <code>compileSdkVersion 26</code>. I've also set up <code>android:autofillHints="phone"</code> for my phone number input field. When I tap on the field, I can see <em>"Autofill"</em> popping up. However, when I tap on <em>"Autofill"</em>, <em>"Contents can't be autofilled"</em> toast appears and I see the following trace in logcat:</p>
  
  <pre><code>RemoteFillService  Not handling { when=-3ms what=3 target=com.android.internal.os.HandlerCaller$MyHandler } as service for ComponentInfo{com.google.android.gms/com.google.android.gms.autofill.service.AutofillService} is already destroyed
  View               dispatchProvideAutofillStructure(): not laid out, ignoring
  </code></pre>
  
  <p>How should I fix this? I've confirmed that I have the phone number configured in <em>Settings > System > Languages &amp; input > Advanced > Input assistance > Autofill service</em>.</p>
  
  <p>UPDATE with a sample XML: In API 26 emulator settings, I can select "Autofill with Google". Using the Design tab of Android Studio, I added a <em>"Phone"</em> type <code>EditText</code>, and then manually inserted <code>android:autofillHints="phone"</code> in the XML element: </p>
  
  <pre><code>&lt;EditText
      android:id="@+id/editText"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:ems="10"
      android:inputType="phone"
      android:autofillHints="phone" /&gt;
  </code></pre>
  
  <p>Logcat peculiarities described above can be observed using this XML.</p>