title: E/LoadedApk: Unable to instantiate appComponentFactory only on Android Q (API 29)
body: <p>I have searched everywhere about this and still have no solution.</p>
  <p>The gradle has minSdkVersion 21 and targetSdkVersion 29</p>
  <p>I got error only in API 29, then the app doesn't load and show up blank screen. When i see logcat it gives an error like this :</p>
  <pre><code>E/LoadedApk: Unable to instantiate appComponentFactory
  java.lang.ClassNotFoundException: Didn't find class &quot;androidx.core.app.CoreComponentFactory&quot; on path: DexPathList[[],nativeLibraryDirectories=[/data/app/com.packagename.appname-BxS7Zs-h0IWwJAVhbjx7aQ==/lib/x86, /data/app/com.packagename.appname-BxS7Zs-h0IWwJAVhbjx7aQ==/base.apk!/lib/x86, /system/lib, /system/product/lib]]
      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      at android.app.LoadedApk.createAppFactory(LoadedApk.java:256)
      at android.app.LoadedApk.updateApplicationInfo(LoadedApk.java:370)
      at android.app.ActivityThread.handleDispatchPackageBroadcast(ActivityThread.java:5951)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1941)
      at android.os.Handler.dispatchMessage(Handler.java:107)
      at android.os.Looper.loop(Looper.java:214)
      at com.android.server.SystemServer.run(SystemServer.java:541)
      at com.android.server.SystemServer.main(SystemServer.java:349)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:908)
  </code></pre>
  <p>I think it seems like from multidex, then i have tried adding following code to gradle app</p>
  <blockquote>
  <p>multiDexKeepFile file('multidex-config.txt')</p>
  <p>multiDexKeepProguard file('multidex-config.pro')</p>
  </blockquote>
  <p>my multidex-config.txt</p>
  <pre><code>com/packagename/appname/androidx.class
  </code></pre>
  <p>my multidex-config.pro</p>
  <pre><code>-keep class androidx.core.app.CoreComponentFactory { *; }
  </code></pre>
  <p>my App class extending MultiDexApplication</p>
  <pre><code>public class App extends MultiDexApplication {
  
      @Override
      protected void attachBaseContext(Context base) {
          super.attachBaseContext(base);
          MultiDex.install(this);
      }
  }
  </code></pre>
  <p>my Manifest</p>
  <pre><code>&lt;application
      android:name=&quot;.App&quot;
      android:allowBackup=&quot;true&quot;
      android:icon=&quot;@mipmap/ic_logo&quot;
      android:label=&quot;@string/app_name&quot;
      android:roundIcon=&quot;@mipmap/ic_logo&quot;
      android:supportsRtl=&quot;true&quot;
      android:theme=&quot;@style/main&quot;
      android:usesCleartextTraffic=&quot;true&quot;
      tools:ignore=&quot;GoogleAppIndexingWarning&quot;&gt;
  </code></pre>
  <p>my gradle.properties</p>
  <pre><code>android.enableJetifier=true
  android.useAndroidX=true
  org.gradle.jvmargs=-Xmx1536m
  </code></pre>
  <p>my gradle/app</p>
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'com.google.gms.google-services'
  apply plugin: 'io.fabric'
  
  apply plugin: 'kotlin-android'
  
  apply plugin: 'kotlin-android-extensions'
  
  android {
      compileSdkVersion 29
      buildToolsVersion &quot;29.0.3&quot;
      defaultConfig {
          applicationId &quot;com.packagename.appname&quot;
          minSdkVersion 21
          targetSdkVersion 29
          versionCode 7
          versionName &quot;1.0&quot;
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
      buildTypes {
          debug {
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              multiDexKeepFile file('multidex-config.txt')
              multiDexKeepProguard file('multidex-config.pro')
              minifyEnabled true
          }
          release {
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
              multiDexKeepFile file('multidex-config.txt')
              multiDexKeepProguard file('multidex-config.pro')
              minifyEnabled true
          }
      }
      compileOptions {
          targetCompatibility JavaVersion.VERSION_1_8
          sourceCompatibility JavaVersion.VERSION_1_8
      }
      kotlinOptions {
          jvmTarget = &quot;1.8&quot;
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&quot;
      implementation 'androidx.appcompat:appcompat:1.1.0'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      implementation 'com.google.android.gms:play-services-maps:17.0.0'
      implementation 'com.google.android.libraries.places:places:2.2.0'
      testImplementation 'junit:junit:4.13'
      androidTestImplementation 'androidx.test.ext:junit:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
      implementation 'com.google.android.material:material:1.1.0'
      implementation 'androidx.cardview:cardview:1.0.0'
  
      implementation 'com.android.support:multidex:2.0.1'
  
      implementation 'com.github.vipulasri:timelineview:1.1.0'
      implementation 'de.hdodenhof:circleimageview:3.1.0'
      implementation 'com.yanzhenjie.zbar:camera:1.0.0'
      implementation 'androidx.percentlayout:percentlayout:1.0.0'
  
      implementation 'com.amitshekhar.android:android-networking:1.0.2'
  
      implementation 'com.google.firebase:firebase-core:17.2.2'
      implementation 'com.google.firebase:firebase-messaging:20.1.0'
      implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
  
      implementation 'com.github.bumptech.glide:glide:4.11.0'
      annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
  
      implementation 'com.github.kenglxn.QRGen:android:2.5.0'
  
      implementation 'com.facebook.android:facebook-android-sdk:4.36.0'
  
      implementation 'com.jsibbold:zoomage:1.2.0'
  
      implementation 'androidx.arch.core:core-common:2.1.0'
      implementation 'androidx.arch.core:core-runtime:2.1.0'
  }
  </code></pre>
  <p>I really need a solution for this. Help me please, thank you so much!</p>