0

There was a problem with my app, so it was recommended to update Android Studio. Then my code crashed (I was not able to choose android view instead of package view anymore). So I made a new package in which I copied all the classes and all. My first errors were about androidx (since the updated Adnroid Studio used androidx). So I changed the android.support.... to androidx... Now I have been working a while op the problem of the dex files (like Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList). Please help me, I do not know what to do anymore.

Here is my error:

2019-12-01 17:14:03.872 9399-9399/? I/cacaphonymappe: Late-enabling -Xcheck:jni
2019-12-01 17:14:03.949 9399-9399/? W/re-initialized>: type=1400 audit(0.0:3903): avc: denied { read } for name="u:object_r:mtk_amslog_prop:s0" dev="tmpfs" ino=8549 scontext=u:r:untrusted_app:s0:c96,c256,c512,c768 tcontext=u:object_r:mtk_amslog_prop:s0 tclass=file permissive=0
2019-12-01 17:14:03.954 9399-9399/? E/libc: Access denied finding property "persist.vendor.sys.activitylog"
2019-12-01 17:14:04.576 9399-9399/com.example.cacaphonymapper W/cacaphonymappe: Bad encoded_array value: Failure to verify dex file '/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk': Bad encoded_value method type size 7
2019-12-01 17:14:04.587 9399-9399/com.example.cacaphonymapper E/LoadedApk: Unable to instantiate appComponentFactory
    java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[zip file "/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/lib/arm64, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.LoadedApk.createAppFactory(LoadedApk.java:226)
        at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:731)
        at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
        at android.app.LoadedApk.getResources(LoadedApk.java:1032)
        at android.app.ContextImpl.createAppContext(ContextImpl.java:2346)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5780)
        at android.app.ActivityThread.access$1200(ActivityThread.java:206)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1678)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6702)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
        Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk because: Bad encoded_array value: Failure to verify dex file '/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk': Bad encoded_value method type size 7
        at dalvik.system.DexFile.openDexFileNative(Native Method)
        at dalvik.system.DexFile.openDexFile(DexFile.java:354)
        at dalvik.system.DexFile.<init>(DexFile.java:101)
        at dalvik.system.DexFile.<init>(DexFile.java:75)
        at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
        at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
        at dalvik.system.DexPathList.<init>(DexPathList.java:164)
        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
        at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
        at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
                ... 12 more
2019-12-01 17:14:04.615 9399-9399/com.example.cacaphonymapper D/AndroidRuntime: Shutting down VM
2019-12-01 17:14:04.621 9399-9399/com.example.cacaphonymapper E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.cacaphonymapper, PID: 9399
    java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/lib/arm64, /system/lib64]]
        at android.app.ActivityThread.installProvider(ActivityThread.java:6427)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5969)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5884)
        at android.app.ActivityThread.access$1200(ActivityThread.java:206)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1678)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6702)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/lib/arm64, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:121)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6411)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5969) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5884) 
        at android.app.ActivityThread.access$1200(ActivityThread.java:206) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1678) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6702) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911) 
        Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk because: Bad encoded_array value: Failure to verify dex file '/data/app/com.example.cacaphonymapper-YiYzrnehptkaTruFxJpaGw==/base.apk': Bad encoded_value method type size 7
        at dalvik.system.DexFile.openDexFileNative(Native Method)
        at dalvik.system.DexFile.openDexFile(DexFile.java:354)
        at dalvik.system.DexFile.<init>(DexFile.java:101)
        at dalvik.system.DexFile.<init>(DexFile.java:75)
        at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
        at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
        at dalvik.system.DexPathList.<init>(DexPathList.java:164)
        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
        at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
        at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
        at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
        at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
        at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
        at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
        at android.app.LoadedApk.getResources(LoadedApk.java:1032)
        at android.app.ContextImpl.createAppContext(ContextImpl.java:2346)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5780)
                ... 8 more
2019-12-01 17:14:04.665 9399-9399/com.example.cacaphonymapper I/Process: Sending signal. PID: 9399 SIG: 9

This is my gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "29.0.0"
    defaultConfig {
        applicationId "com.example.cacaphonymapper"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //Basics
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.appcompat:appcompat-resources:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    //Firebase
    implementation 'com.google.firebase:firebase-core:17.2.1'
    implementation 'com.google.firebase:firebase-firestore:21.3.0'
    implementation 'com.google.firebase:firebase-database:19.2.0'
    implementation 'com.google.firebase:firebase-storage:19.1.0'
    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.google.gms:google-services:4.3.3'
    //Beacons (place)
    implementation 'com.estimote:proximity-sdk:1.0.3'
    implementation 'com.estimote:mustard:0.2.1'
    implementation 'com.estimote:sdk:1.4.5'
    //Graphs
    implementation 'com.jjoe64:graphview:4.2.2'
}

Thanks a lot P.S. If you know a way to get the code back from before the update, maybe we can do something with that as well.

  • 1
    Does this answer your question? [Didn't find class "androidx.core.app.CoreComponentFactory"](https://stackoverflow.com/questions/57700486/didnt-find-class-androidx-core-app-corecomponentfactory) – Martin Zeitler Dec 01 '19 at 16:38
  • Yeah, I saw that one, they refer to a issuetracker. I wanted to try something out, but I don't know how to check if androidx.core.app.CoreComponentFactory inside the dex file. 1.Can you explain to me how to get to the dex files? They also mention including -keep class androidx.core.app.CoreComponentFactory { *; } in the proguard rules a lot (also on the stackOverflow your link refers to again). But again, I have no idea how to come/see the proguars rules. 2.Could you explain getting those to me – user12112496 Dec 03 '19 at 07:14

0 Answers0