title: Error inflating class com.google.android.material.navigation.NavigationView after migration to AndroidX
body: <p>After I updated my project to <code>AndroidX</code> with <code>targetSdkVersion</code> set to 28, my project crashes when installing it from the store for beta testing.</p>
  <p>The following is the error log I receive:</p>
  <pre><code>2019-07-08 08:28:33.026 32011-32011/? E/AndroidRuntime: FATAL EXCEPTION: main Process: hu.itq.oakprotection, PID: 32011
          java.lang.RuntimeException: Unable to start activity ComponentInfo{hu.itq.oakprotection/hu.itq.oakprotection.MainActivity}: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class com.google.android.material.navigation.NavigationView
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3194)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302)
              at android.app.ActivityThread.-wrap12(Unknown Source:0)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)
              at android.os.Handler.dispatchMessage(Handler.java:108)
              at android.os.Looper.loop(Looper.java:166)
              at android.app.ActivityThread.main(ActivityThread.java:7425)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
           Caused by: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class com.google.android.material.navigation.NavigationView
           Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class com.google.android.material.navigation.NavigationView
           Caused by: java.lang.reflect.InvocationTargetException
              at java.lang.reflect.Constructor.newInstance0(Native Method)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
              at android.view.LayoutInflater.createView(LayoutInflater.java:658)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:801)
              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
              at android.view.LayoutInflater.rInflate(LayoutInflater.java:874)
              at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:835)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
              at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
              at androidx.appcompat.app.AppCompatDelegateImpl.c(Unknown Source:23)
              at androidx.appcompat.app.AppCompatActivity.setContentView(Unknown Source:4)
              at hu.itq.oakprotection.MainActivity.onCreate(Unknown Source:6)
              at android.app.Activity.performCreate(Activity.java:7372)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3147)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302)
              at android.app.ActivityThread.-wrap12(Unknown Source:0)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)
              at android.os.Handler.dispatchMessage(Handler.java:108)
              at android.os.Looper.loop(Looper.java:166)
              at android.app.ActivityThread.main(ActivityThread.java:7425)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
           Caused by: java.lang.NoSuchMethodError: No interface method d()I in class Lorg/xmlpull/v1/XmlPullParser; or its super classes (declaration of 'org.xmlpull.v1.XmlPullParser' appears in /system/framework/core-libart.jar)
              at androidx.appcompat.view.SupportMenuInflater.a(Unknown Source:5)
              at androidx.appcompat.view.SupportMenuInflater.inflate(Unknown Source:25)
              at com.google.android.material.navigation.NavigationView.b(Unknown Source:12)
              at com.google.android.material.navigation.NavigationView.&lt;init&gt;(Unknown Source:255)
              at com.google.android.material.navigation.NavigationView.&lt;init&gt;(Unknown Source:2)
              at java.lang.reflect.Constructor.newInstance0(Native Method) 
              at java.lang.reflect.Constructor.newInstance(Constructor.java:334) 
  </code></pre>
  <p>The following are my dependencies in <code>build.gradle</code> file:</p>
  <pre><code>android {
      compileSdkVersion 28
      def versionMajor = 1
      def versionMinor = 0
      def versionPatch = 1
      def versionBuild = 4 // ezt kell átírni új verzió kirakásakor
  
      defaultConfig {
          applicationId &quot;hu.itq.oakprotection&quot;
          minSdkVersion 23
          targetSdkVersion 28
          versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
          versionName &quot;${versionMajor}.${versionMinor}.${versionPatch}&quot;
      }
      buildTypes {
          release {
              minifyEnabled true
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          targetCompatibility 1.8
          sourceCompatibility 1.8
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
  
      implementation 'androidx.core:core:1.0.2'
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'androidx.annotation:annotation:1.1.0'
  
      implementation 'com.payumoney.sdkui:plug-n-play:1.2.0'
      implementation 'androidx.cardview:cardview:1.0.0'
      implementation 'com.google.android.material:material:1.1.0-alpha07'
      implementation 'androidx.browser:browser:1.0.0'
      implementation 'com.google.android.gms:play-services-base:17.0.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.2.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
      //Test error miatt kellett
      implementation 'androidx.annotation:annotation:1.1.0'
  
      //Aszinkron hálózatokhoz
      implementation 'com.android.volley:volley:1.1.1'
  
      //Facebook
      implementation 'com.facebook.android:facebook-android-sdk:4.34.0'
      //Osm Droid
      implementation 'org.osmdroid:osmdroid-android:6.1.0'
      implementation 'com.github.MKergall:osmbonuspack:6.4'
  
      implementation 'com.github.angads25:filepicker:1.1.1'
      //Tile provider igényli
      implementation 'mil.nga.geopackage:geopackage-android:3.0.2'
      implementation 'com.j256.ormlite:ormlite-android:5.1'
      implementation 'mil.nga.geopackage:geopackage-core:3.0.2'
      implementation 'ar.com.hjg:pngj:2.1.0'
      implementation 'mil.nga:tiff:2.0.0'
      implementation('mil.nga.geopackage:geopackage-android:3.0.2') {
          exclude group: 'com.google.android.gms', module: 'play-services'
          exclude group: 'com.google.maps.android', module: 'android-maps-utils'
          exclude group: 'com.android.support', module: 'support-v13'
      }
      //Glide
      implementation 'com.github.bumptech.glide:glide:4.8.0'
      annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
      //Mapsforge rendering and database support, which is LGPL
      implementation 'org.mapsforge:mapsforge-map-android:0.8.0'
      implementation 'org.mapsforge:mapsforge-map:0.8.0'
      implementation 'org.mapsforge:mapsforge-themes:0.8.0'
      // ExoPlayer
      implementation 'com.google.android.exoplayer:exoplayer:2.7.3'
      //Youtube
      implementation 'com.github.HaarigerHarald:android-youtubeExtractor:v1.7.0'}
  </code></pre>
  <p>activity_main.xml:</p>
  <pre><code>&lt;androidx.drawerlayout.widget.DrawerLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:id=&quot;@+id/drawer_layout&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:fitsSystemWindows=&quot;true&quot;
      tools:openDrawer=&quot;start&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
      &lt;include
          layout=&quot;@layout/app_bar_main&quot; /&gt;
  
      &lt;com.google.android.material.navigation.NavigationView
          android:id=&quot;@+id/nav_view&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;match_parent&quot;
          android:layout_gravity=&quot;start&quot;
          android:fitsSystemWindows=&quot;true&quot;
          app:headerLayout=&quot;@layout/nav_header_main&quot;
          app:menu=&quot;@menu/activity_main_drawer&quot;
          app:itemIconTint=&quot;@color/colorPrimary&quot;
          app:itemTextColor=&quot;@color/colorPrimary&quot;
          android:backgroundTint=&quot;@color/colorWhite&quot;/&gt;
  
  &lt;/androidx.drawerlayout.widget.DrawerLayout&gt;
  </code></pre>
  <p>Why am I receiving an <code>android.view.InflateException</code> error for <code>NavigationView</code>?</p>