java.lang.RuntimeException: Unable to instantiate application com.xxxx.android.base.XXXBaseApplication: com.tencent.tinker.loader.TinkerRuntimeException: Tinker Exception:onBaseContextAttached method not found

GitHub | l114624915 | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Tinker移入项目运行报错: <

    GitHub | 5 months ago | l114624915
    java.lang.RuntimeException: Unable to instantiate application com.xxxx.android.base.XXXBaseApplication: com.tencent.tinker.loader.TinkerRuntimeException: Tinker Exception:onBaseContextAttached method not found

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'android.os.Looper android.content.Context.getMainLooper()' on a null object reference

      at com.umeng.message.PushAgent.<init>()
    2. com.umeng.message
      PushAgent.getInstance
      1. com.umeng.message.PushAgent.<init>(PushAgent.java:78)
      2. com.umeng.message.PushAgent.getInstance(PushAgent.java:89)
      2 frames
    3. com.xxxx.android
      XXXBaseApplicationLike.onBaseContextAttached
      1. com.xxxx.android.base.XXXBaseApplicationLike.initUM(XXXBaseApplicationLike.java:181)
      2. com.xxxx.android.base.XXXBaseApplicationLike.init(XXXBaseApplicationLike.java:144)
      3. com.xxxx.android.base.XXXBaseApplicationLike.onBaseContextAttached(XXXBaseApplicationLike.java:134)
      3 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    5. com.tencent.tinker
      TinkerApplication.attachBaseContext
      1. com.tencent.tinker.loader.app.TinkerApplication.onBaseContextAttached(TinkerApplication.java:138)
      2. com.tencent.tinker.loader.app.TinkerApplication.attachBaseContext(TinkerApplication.java:154)
      2 frames
    6. Android Platform
      ActivityThread.main
      1. android.app.Application.attach(Application.java:191)
      2. android.app.Instrumentation.newApplication(Instrumentation.java:998)
      3. android.app.Instrumentation.newApplication(Instrumentation.java:982)
      4. android.app.LoadedApk.makeApplication(LoadedApk.java:575)
      5. android.app.ActivityThread.handleBindApplication(ActivityThread.java:4699)
      6. android.app.ActivityThread.access$1600(ActivityThread.java:153)
      7. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
      8. android.os.Handler.dispatchMessage(Handler.java:102)
      9. android.os.Looper.loop(Looper.java:148)
      10. android.app.ActivityThread.main(ActivityThread.java:5438)
      10 frames
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    8. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
      2 frames