HeavyRain
1. 对比demo,看看demo是否有同样的问题?
2. 提供完整的日志。
请反馈以上2点要求
你好 经过测试结果如下!
1. 运行demo 没有错误. 但是在demo中调用 ChatManager.Instance().connect方法也会出现ANR。
2. 2020-11-11 12:47:13.737 29025-29025/? I/art: Late-enabling -Xcheck:jni
2020-11-11 12:47:13.737 29025-29025/? W/art: Unexpected CPU variant for X86 using defaults: x86
2020-11-11 12:47:13.744 29025-29032/? I/art: Ignoring second debugger -- accepting and dropping
2020-11-11 12:47:13.820 29025-29025/cn.wildfirechat.chat I/MultiDex: VM with version 2.1.0 has multidex support
2020-11-11 12:47:13.820 29025-29025/cn.wildfirechat.chat I/MultiDex: Installing application
2020-11-11 12:47:13.820 29025-29025/cn.wildfirechat.chat I/MultiDex: VM has multidex support, MultiDex support library is disabled.
2020-11-11 12:47:13.829 29025-29025/cn.wildfirechat.chat I/System.out: pandy.club初始化啦!!!!
2020-11-11 12:47:13.843 29025-29032/cn.wildfirechat.chat I/art: Ignoring second debugger -- accepting and dropping
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: java.lang.ClassNotFoundException: cn.wildfirechat.moment.MomentClient
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at java.lang.Class.classForName(Native Method)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at java.lang.Class.forName(Class.java:400)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at java.lang.Class.forName(Class.java:326)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at cn.wildfire.chat.kit.WfcUIKit.initMomentClient(WfcUIKit.java:153)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at cn.wildfire.chat.kit.WfcUIKit.init(WfcUIKit.java:83)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at cn.wildfire.chat.app.MyApp.onCreate(MyApp.java:44)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5482)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at android.app.ActivityThread.-wrap2(ActivityThread.java)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1548)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at android.os.Looper.loop(Looper.java:154)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6198)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "cn.wildfirechat.moment.MomentClient" on path: DexPathList[[zip file "/data/app/cn.wildfirechat.chat-1/base.apk"],nativeLibraryDirectories=[/data/app/cn.wildfirechat.chat-1/lib/x86, /data/app/cn.wildfirechat.chat-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
2020-11-11 12:47:13.864 29025-29025/cn.wildfirechat.chat W/System.err: ... 16 more
2020-11-11 12:47:13.876 29025-29025/cn.wildfirechat.chat D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2020-11-11 12:47:13.884 29025-29025/cn.wildfirechat.chat D/WfcUIKit: init end
2020-11-11 12:47:13.888 29025-29025/cn.wildfirechat.chat E/mcssdk---: MCS-->isExistPackage NameNotFoundException:com.coloros.mcs
2020-11-11 12:47:13.906 29025-29025/cn.wildfirechat.chat E/MessageViewHolderManager: re-register message view holder SimpleNotificationMessageContentViewHolder
2020-11-11 12:47:13.911 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: Application config ({1.0 460mcc7mnc [zh_CN] ldltr sw450dp w450dp h776dp 320dpi nrml long port finger -keyb/v/h -nav/h s.34}) matches base context config, using empty base overlay
2020-11-11 12:47:13.912 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: Applying night mode using ContextThemeWrapper and applyOverrideConfiguration(). Config: {0.0 ?mcc?mnc ?localeList ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?orien ?uimode ?touch ?keyb/?/? ?nav/?}
2020-11-11 12:47:13.914 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode [allowRecreation:false, currentNightMode:16, newNightMode:16, activityHandlingUiMode:false, baseContextAttached:true, created:false, canReturnDifferentContext:true, host:cn.wildfire.chat.app.main.SplashActivity@4507f62]
2020-11-11 12:47:13.914 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode not recreating Activity: cn.wildfire.chat.app.main.SplashActivity@4507f62
2020-11-11 12:47:13.914 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode. Skipping. Night mode: -1 for host:cn.wildfire.chat.app.main.SplashActivity@4507f62
2020-11-11 12:47:13.916 29025-29032/cn.wildfirechat.chat I/art: Ignoring second debugger -- accepting and dropping
2020-11-11 12:47:13.916 29025-29025/cn.wildfirechat.chat 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
2020-11-11 12:47:13.921 29025-29086/cn.wildfirechat.chat V/xiaomi: [Thread:572] Don't send message before initialization succeeded!
2020-11-11 12:47:13.932 29025-29086/cn.wildfirechat.chat V/xiaomi: [Thread:572] Don't send message before initialization succeeded!
2020-11-11 12:47:13.941 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode [allowRecreation:true, currentNightMode:16, newNightMode:16, activityHandlingUiMode:false, baseContextAttached:true, created:true, canReturnDifferentContext:true, host:cn.wildfire.chat.app.main.SplashActivity@4507f62]
2020-11-11 12:47:13.941 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode not recreating Activity: cn.wildfire.chat.app.main.SplashActivity@4507f62
2020-11-11 12:47:13.941 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode. Skipping. Night mode: -1 for host:cn.wildfire.chat.app.main.SplashActivity@4507f62
2020-11-11 12:47:13.980 29025-29096/cn.wildfirechat.chat I/OpenGLRenderer: Initialized EGL, version 1.4
2020-11-11 12:47:13.980 29025-29096/cn.wildfirechat.chat D/OpenGLRenderer: Swap behavior 1
2020-11-11 12:47:14.947 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: Application config ({1.0 460mcc7mnc [zh_CN] ldltr sw450dp w450dp h776dp 320dpi nrml long port finger -keyb/v/h -nav/h s.34}) matches base context config, using empty base overlay
2020-11-11 12:47:14.947 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: Applying night mode using ContextThemeWrapper and applyOverrideConfiguration(). Config: {0.0 ?mcc?mnc ?localeList ?layoutDir ?swdp ?wdp ?hdp ?density ?lsize ?long ?orien ?uimode ?touch ?keyb/?/? ?nav/?}
2020-11-11 12:47:14.948 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode [allowRecreation:false, currentNightMode:16, newNightMode:16, activityHandlingUiMode:false, baseContextAttached:true, created:false, canReturnDifferentContext:true, host:cn.wildfire.chat.app.login.SMSLoginActivity@3fc1d0e]
2020-11-11 12:47:14.948 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode not recreating Activity: cn.wildfire.chat.app.login.SMSLoginActivity@3fc1d0e
2020-11-11 12:47:14.948 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode. Skipping. Night mode: -1 for host:cn.wildfire.chat.app.login.SMSLoginActivity@3fc1d0e
2020-11-11 12:47:14.955 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode [allowRecreation:true, currentNightMode:16, newNightMode:16, activityHandlingUiMode:false, baseContextAttached:true, created:true, canReturnDifferentContext:true, host:cn.wildfire.chat.app.login.SMSLoginActivity@3fc1d0e]
2020-11-11 12:47:14.956 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode not recreating Activity: cn.wildfire.chat.app.login.SMSLoginActivity@3fc1d0e
2020-11-11 12:47:14.956 29025-29025/cn.wildfirechat.chat D/AppCompatDelegate: updateForNightMode. Skipping. Night mode: -1 for host:cn.wildfire.chat.app.login.SMSLoginActivity@3fc1d0e
2020-11-11 12:47:16.963 29025-29025/cn.wildfirechat.chat W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
2020-11-11 12:47:17.496 29025-29025/cn.wildfirechat.chat W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
2020-11-11 12:47:18.062 29025-29025/cn.wildfirechat.chat W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: android.os.DeadObjectException
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.os.BinderProxy.transactNative(Native Method)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.os.BinderProxy.transact(Binder.java:615)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at cn.wildfirechat.client.IRemoteClient$Stub$Proxy.connect(IRemoteClient.java:2345)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at cn.wildfirechat.remote.ChatManager.connect(ChatManager.java:1457)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at cn.wildfire.chat.app.login.SMSLoginActivity.login(SMSLoginActivity.java:76)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at cn.wildfire.chat.app.login.SMSLoginActivity_ViewBinding$1.doClick(SMSLoginActivity_ViewBinding.java:51)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:18)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.view.View.performClick(View.java:5638)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.view.View$PerformClick.run(View.java:22430)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.os.Handler.handleCallback(Handler.java:751)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.os.Looper.loop(Looper.java:154)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6198)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
2020-11-11 12:47:19.874 29025-29025/cn.wildfirechat.chat W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
2020-11-11 12:47:19.883 29025-29025/cn.wildfirechat.chat I/Choreographer: Skipped 64 frames! The application may be doing too much work on its main thread.
2020-11-11 12:47:19.893 29025-29032/cn.wildfirechat.chat I/art: Ignoring second debugger -- accepting and dropping
2020-11-11 12:47:19.908 29025-29025/cn.wildfirechat.chat E/chatManager: onServiceDisconnected
2020-11-11 12:47:19.931 29025-29032/cn.wildfirechat.chat I/art: Ignoring second debugger -- accepting and dropping
2020-11-11 12:47:20.708 29025-29025/cn.wildfirechat.chat I/Choreographer: Skipped 43 frames! The application may be doing too much work on its main thread.