@niknik_ykt
Не понимаю почему все это работает.

Как исправить ошибку в main.xml после перехода на андроид икс?

Поставил таргет апи 29, потом пофиксил код с помощью рефактор -> мигрейт то андроид икс. На джава вроде все хорошо, но main.xml сплошная ошибка. Как его пофиксить?
5fdad7b4c8508713118871.png
P.S. интересно, но файл апк собирается, все без ошибок и т.д., но когда пытаюсь запустить приложение оно вылетает без всяких уведомлений и т.п. Думаю дело исключительно в main.xml.
Вот сам код:
<androidx.core.widget.DrawerLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/_drawer"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:openDrawer="start">
  <android.support.design.widget.CoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:theme="@style/AppTheme.AppBarOverlay">
      <android.support.v7.widget.Toolbar
        android:id="@+id/_toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/AppTheme.PopupOverlay"/>
    </android.support.design.widget.AppBarLayout>
    <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      app:layout_behavior="@string/appbar_scrolling_view_behavior">

      <LinearLayout
        android:id="@+id/vscroll2"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <WebView
          android:id="@+id/webview2"
          android:layout_width="match_parent"
          android:layout_height="match_parent" />
      </LinearLayout>
    </LinearLayout>
    <android.support.design.widget.FloatingActionButton
      android:id="@+id/_fab"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_margin="16dp"
      android:layout_gravity="right|bottom"
      app:srcCompat="@drawable/ic_home_black"/>
  </android.support.design.widget.CoordinatorLayout>

  <LinearLayout
    android:id="@+id/_nav_view"
    android:layout_width="320dp"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:background="#BE3C3C3C">

    <include layout="@layout/_drawer_main" />
  </LinearLayout>
</androidx.core.widget.DrawerLayout>
  • Вопрос задан
  • 19 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы