我的应用程序已安装,但直到无法打开

时间:2019-12-03 08:34:24

标签: java android-studio

2019-12-05 11:46:11.686 28837-28837/? I/art: Late-enabling -Xcheck:jni
2019-12-05 11:46:11.694 28837-28837/? D/Zygote: runOnce: Connection end
2019-12-05 11:46:11.783 28837-28837/cmr.mlc.mytchat W/System: ClassLoader referenced unknown path: /data/app/cmr.mlc.mytchat-1/lib/arm
2019-12-05 11:46:12.151 28837-28852/? W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
2019-12-05 11:46:12.214 28837-28854/? W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
2019-12-05 11:46:12.236 28837-28854/? I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
2019-12-05 11:46:12.286 28837-28837/? V/FA: Registered activity lifecycle callback
2019-12-05 11:46:12.289 28837-28837/? I/FirebaseInitProvider: FirebaseApp initialization successful
2019-12-05 11:46:12.405 28837-28837/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
2019-12-05 11:46:12.413 28837-28837/? V/Activity: onCreate cmr.mlc.mytchat.LoginActivity@8e12c50: null
2019-12-05 11:46:12.414 28837-28837/? V/FA: onActivityCreated
2019-12-05 11:46:12.467 28837-28837/? I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
2019-12-05 11:46:12.467 28837-28837/? I/art:     at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2421)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:779)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:659)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:552)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:161)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void cmr.mlc.mytchat.LoginActivity.onCreate(android.os.Bundle) (LoginActivity.java:51)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6746)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1120)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2677)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2789)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1527)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:110)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.os.Looper.loop() (Looper.java:203)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6258)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1063)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:924)
2019-12-05 11:46:12.468 28837-28837/? I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/cmr.mlc.mytchat-1/base.apk"],nativeLibraryDirectories=[/data/app/cmr.mlc.mytchat-1/lib/arm, /system/lib, /vendor/lib, /system/vendor/lib]]
2019-12-05 11:46:12.468 28837-28837/? I/art:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2421)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:779)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:659)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:552)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:161)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void cmr.mlc.mytchat.LoginActivity.onCreate(android.os.Bundle) (LoginActivity.java:51)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6746)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1120)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2677)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2789)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1527)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:110)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.os.Looper.loop() (Looper.java:203)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6258)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1063)
2019-12-05 11:46:12.468 28837-28837/? I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:924)
2019-12-05 11:46:12.501 28837-28863/? V/FA: Collection enabled
2019-12-05 11:46:12.506 28837-28848/? I/art: Enter while loop.
2019-12-05 11:46:12.518 28837-28863/? V/FA: App package, google app id: cmr.mlc.mytchat, 1:192819536094:android:88383cfba9679bbe3d224f
2019-12-05 11:46:12.527 28837-28863/? I/FA: App measurement is starting up, version: 19000
2019-12-05 11:46:12.528 28837-28863/? I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2019-12-05 11:46:12.528 28837-28863/? I/FA: To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app cmr.mlc.mytchat
2019-12-05 11:46:12.528 28837-28863/? D/FA: Debug-level message logging enabled
2019-12-05 11:46:12.609 28837-28863/? D/OpenSSLLib: OpensslErr:Module:12(175:); file:external/boringssl/src/crypto/asn1/asn1_lib.c ;Line:175;Function:ASN1_get_object
2019-12-05 11:46:12.678 28837-28837/? D/AndroidRuntime: Shutting down VM
2019-12-05 11:46:12.679 28837-28837/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: cmr.mlc.mytchat, PID: 28837
    java.lang.RuntimeException: Unable to start activity ComponentInfo{cmr.mlc.mytchat/cmr.mlc.mytchat.LoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.app.ActionBar.setTitle(java.lang.CharSequence)' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
        at android.app.ActivityThread.-wrap12(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
        at android.os.Handler.dispatchMessage(Handler.java:110)
        at android.os.Looper.loop(Looper.java:203)
        at android.app.ActivityThread.main(ActivityThread.java:6258)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.app.ActionBar.setTitle(java.lang.CharSequence)' on a null object reference
        at cmr.mlc.mytchat.LoginActivity.onCreate(LoginActivity.java:57)
        at android.app.Activity.performCreate(Activity.java:6746)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1120)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)�
        at android.app.ActivityThread.-wrap12(ActivityThread.java)�
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)�
        at android.os.Handler.dispatchMessage(Handler.java:110)�
        at android.os.Looper.loop(Looper.java:203)�
        at android.app.ActivityThread.main(ActivityThread.java:6258)�
        at java.lang.reflect.Method.invoke(Native Method)�
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)�
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)�

2 个答案:

答案 0 :(得分:1)

似乎您的程序正在寻找没有参数的LoginActivity的构造函数。尝试在代码内添加以下内容

public LoginActivity(){
}

答案 1 :(得分:0)

错误似乎是您正在尝试启动一个类之类的活动,而该活动最终将在android中失败。

无论您在哪里开始活动,都可以执行以下操作

Intent intent = new Intent(this, LoginActivity.class);
startActivity(intent);