moko256 / twitlatte

Twitter and Mastodon client for Android
Apache License 2.0
102 stars 13 forks source link

Can't run the app #39

Closed EinnTveirPrirFjorir closed 5 years ago

EinnTveirPrirFjorir commented 5 years ago

I followed the instructions in the README to build the app but when I try to run it in Android Studio it always crashes with the following error:

Process: com.github.moko256.twitlatte.debug, PID: 4439
    java.lang.RuntimeException: Unable to get provider androidx.lifecycle.ProcessLifecycleOwnerInitializer: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList[[zip file "/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/base.apk", zip file "/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/split_lib_resources_apk.apk", zip file "/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/split_lib_slice_0_apk.apk"],nativeLibraryDirectories=[/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/lib/x86, /system/lib, /system/vendor/lib]]
        at android.app.ActivityThread.installProvider(ActivityThread.java:6407)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5949)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5864)
        at android.app.ActivityThread.access$1100(ActivityThread.java:200)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6680)
        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:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList[[zip file "/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/base.apk", zip file "/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/split_lib_resources_apk.apk", zip file "/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/split_lib_slice_0_apk.apk"],nativeLibraryDirectories=[/data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/lib/x86, /system/lib, /system/vendor/lib]]
        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 androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:62)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5949) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5864) 
        at android.app.ActivityThread.access$1100(ActivityThread.java:200) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6680) 
        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:858) 
        Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.github.moko256.twitlatte.debug-yqpk1JRvXxvonbs3m5IlEg==/split_lib_resources_apk.apk
        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:2345)
2018-12-23 20:54:56.623 4439-4439/? E/AndroidRuntime:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5760)
                ... 8 more
moko256 commented 5 years ago

Please turn off "Instant-Run" in the Android Studio settings (Build, Execution, Deployment > Instaut Run).

moko256 commented 5 years ago

I will add it to README.md.