title: Problem with Firebase migration to androidX
body: <ul>
  <li>Android Studio version: 3.4.1</li>
  <li>Firebase Component: firebase-messaging:</li>
  <li>Component version: 17.3.2</li>
  </ul>
  
  <p>Hi Guys, 
  I have a problem with migration my application which is using firebase messaging to androidx.
  I followed the instructions <a href="https://developer.android.com/jetpack/androidx/migrate" rel="nofollow noreferrer">https://developer.android.com/jetpack/androidx/migrate</a></p>
  
  <p>Unfortunately it looks like the firebase components were not migrated yet</p>
  
  <pre><code>java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap;
          at com.google.firebase.FirebaseApp.&lt;clinit&gt;(com.google.firebase:firebase-common@@17.1.0:101)
          at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.1.0:244)
          at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.1.0:53)
          at android.content.ContentProvider.attachInfo(ContentProvider.java:1927)
          at android.content.ContentProvider.attachInfo(ContentProvider.java:1902)
          at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.1.0:47)
          at android.app.ActivityThread.installProvider(ActivityThread.java:6578)
          at android.app.ActivityThread.installContentProviders(ActivityThread.java:6133)
          at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6043)
          at android.app.ActivityThread.-wrap1(Unknown Source:0)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)
          at android.os.Handler.dispatchMessage(Handler.java:105)
          at android.os.Looper.loop(Looper.java:164)
          at android.app.ActivityThread.main(ActivityThread.java:6944)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
       Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArrayMap" on path: DexPathList
  </code></pre>
  
  <p>Is there any workaround for this ?
  I thought that somehow magically it will be resolved by adding:</p>
  
  <pre><code>android.useAndroidX=true
  android.enableJetifier=true
  </code></pre>
  
  <p>Anyway.. I have no clue (as FirebaseApp is still holding the old dependency to v4 support library).
  Am I missing something ? 
  Thanks for any help.</p>
  
  <p>build.gradle</p>
  
  <pre><code>compileSdkVersion 28
      buildToolsVersion "27.0.3"
  
      defaultConfig {
          minSdkVersion 21
          targetSdkVersion 28
          versionCode project.sdkVersionCode
          versionName project.sdkVersionName
  
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
  
  configurations.all { exclude group: 'com.android.support', module: 'support-v4'}
  configurations.all { exclude group: 'com.android.support', module: 'support-compat'}
  configurations.all { exclude group: 'com.android.support', module: 'support-annotations'}
  
  dependencies {
  
      implementation 'androidx.core:core:1.0.2'
      implementation 'androidx.annotation:annotation:1.1.0'
      implementation 'com.google.code.gson:gson:2.8.2'
      implementation 'com.squareup.okhttp3:okhttp:3.9.0'
      implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
      implementation 'com.squareup.retrofit2:retrofit:2.3.0'
      implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
      implementation 'com.squareup.retrofit2:adapter-rxjava:2.0.0'
      implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
      implementation 'io.reactivex:rxandroid:1.2.0'
      implementation 'com.google.firebase:firebase-messaging:17.3.2'
      implementation 'com.google.firebase:firebase-common:17.1.0'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
      implementation 'com.madgag.spongycastle:core:1.58.0.0'
      implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
          transitive = true
      }
  
      testImplementation 'junit:junit:4.12'
      testImplementation 'org.mockito:mockito-core:2.15.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  }
  </code></pre>