Android studio 开发 app 遇到的异常 汇总记录

Timber请求api返回未注册后往注册页面跳转时,触发了异常:

E/ActivityThread: Activity com.yangdejian.timber.activities.MainActivity has leaked ServiceConnection com.yangdejian.timber.MusicPlayer$ServiceBinder@c72924b that was originally bound here
    android.app.ServiceConnectionLeaked: Activity com.yangdejian.timber.activities.MainActivity has leaked ServiceConnection com.yangdejian.timber.MusicPlayer$ServiceBinder@c72924b that was originally bound here
        at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1813)
        at android.app.LoadedApk.getServiceDispatcherCommon(LoadedApk.java:1685)
        at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1664)
        at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1731)
        at android.app.ContextImpl.bindService(ContextImpl.java:1660)
        at android.content.ContextWrapper.bindService(ContextWrapper.java:715)
        at android.content.ContextWrapper.bindService(ContextWrapper.java:715)
        at com.yangdejian.timber.MusicPlayer.bindToService(MusicPlayer.java:61)
        at com.yangdejian.timber.activities.BaseActivity.onCreate(BaseActivity.java:124)
        at com.yangdejian.timber.activities.MainActivity.onCreate(MainActivity.java:177)
        at android.app.Activity.performCreate(Activity.java:7893)
        at android.app.Activity.performCreate(Activity.java:7880)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3283)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3457)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:224)
        at android.app.ActivityThread.main(ActivityThread.java:7562)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
I/ngdejian.timbe: ProcessProfilingInfo new_methods=7452 is saved saved_to_disk=1 resolve_classes_delay=8000
V/FA: Inactivity, disconnecting from the service
V/FA: onUnbind called for intent. action: com.google.android.gms.measurement.START
V/FA: Local AppMeasurementService is shutting down
W/System: A resource failed to call destroy. 
I/chatty: uid=10315(yangdejian.timber) FinalizerDaemon identical 1 line
W/System: A resource failed to call destroy. 

暂未影响app使用,延迟解决。

materialdialogs新弹窗里只有一个输入框(使用input方法),在弹出时抛异常:

W/System.err: java.lang.NoSuchFieldException: No field mCursorDrawable in class Landroid/widget/Editor; (declaration of 'android.widget.Editor' appears in /system/framework/framework.jar!classes3.dex)
W/System.err:     at java.lang.Class.getDeclaredField(Native Method)
W/System.err:     at com.afollestad.materialdialogs.internal.MDTintHelper.setCursorTint(MDTintHelper.java:159)
W/System.err:     at com.afollestad.materialdialogs.internal.MDTintHelper.setTint(MDTintHelper.java:124)
W/System.err:     at com.afollestad.materialdialogs.DialogInit.setupInputDialog(DialogInit.java:442)
W/System.err:     at com.afollestad.materialdialogs.DialogInit.init(DialogInit.java:299)
W/System.err:     at com.afollestad.materialdialogs.MaterialDialog.<init>(MaterialDialog.java:97)
W/System.err:     at com.afollestad.materialdialogs.MaterialDialog$Builder.build(MaterialDialog.java:1423)
W/System.err:     at com.yangdejian.timber.dialogs.CreatePlaylistDialog.onCreateDialog(CreatePlaylistDialog.java:78)
W/System.err:     at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:380)
W/System.err:     at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1412)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:881)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
W/System.err:     at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
W/System.err:     at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150)
W/System.err:     at android.os.Handler.handleCallback(Handler.java:883)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:100)
W/System.err:     at android.os.Looper.loop(Looper.java:224)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7562)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
I/AssistStructure: Flattened final assist data: 6200 bytes, containing 2 windows, 49 views
D/OpenGLRenderer: endAllActiveAnimators on 0x730f7cba00 (RippleDrawable) with handle 0x730fd8f320

目前放弃使用input,使用customView来解决的。

posted @ 2022-09-26 10:03  流失的痕迹  阅读(738)  评论(0编辑  收藏  举报