收藏
回答

Uninitialized ActivityThread

场景介绍:android app调用微信支付,提示支付取消;app端用的appid跟服务端创建订单使用的不是同一个,服务器用的是商户的另一个应用的appid;本应用的appid已经跟商户做了关联

错误提示:E/Instrumentation: Uninitialized ActivityThread, likely app-created Instrumentation, disabling AppComponentFactory

    java.lang.Throwable

        at android.app.Instrumentation.getFactory(Instrumentation.java:1260)

        at android.app.Instrumentation.newActivity(Instrumentation.java:1251)

        at com.tencent.mm.splash.k.newActivity(SourceFile:61)

        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3443)

        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:2040)

        at android.os.Handler.dispatchMessage(Handler.java:107)

        at android.os.Looper.loop(Looper.java:224)

        at android.app.ActivityThread.main(ActivityThread.java:7520)

        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)


详细信息:2021-02-02 22:58:10.853 1817-4745/? I/ActivityTaskManager: START u0 {cmp=com.tencent.mm/.plugin.wallet_index.ui.OrderHandlerUI (has extras)} from uid 10218

2021-02-02 22:58:10.856 1817-4745/? D/CompatibilityInfo: mCompatibilityFlags - 0

2021-02-02 22:58:10.856 1817-4745/? D/CompatibilityInfo: applicationDensity - 440

2021-02-02 22:58:10.856 1817-4745/? D/CompatibilityInfo: applicationScale - 1.0

2021-02-02 22:58:10.857 1817-4745/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger 

2021-02-02 22:58:10.865 1817-2364/? V/UiModeManager: switch night mode to 1

2021-02-02 22:58:10.866 2438-2438/? D/GestureStubView: resetRenderProperty: showGestureStub

2021-02-02 22:58:10.867 2438-2438/? D/GestureStubView: showGestureStub

2021-02-02 22:58:10.867 2438-2438/? D/GestureStubView: resetRenderProperty: showGestureStub

2021-02-02 22:58:10.867 2438-2438/? D/GestureStubView: showGestureStub

2021-02-02 22:58:10.867 1817-13045/? I/ActivityTaskManager: The Process com.tencent.mm Already Exists in BG. So sending its PID: 3977

2021-02-02 22:58:10.869 1817-13045/? D/CompatibilityInfo: mCompatibilityFlags - 0

2021-02-02 22:58:10.869 1817-13045/? D/CompatibilityInfo: applicationDensity - 440

2021-02-02 22:58:10.869 1817-13045/? D/CompatibilityInfo: applicationScale - 1.0

2021-02-02 22:58:10.870 1817-2407/? I/MiuiNetworkPolicyQosUtils: mActivityChangeListener preName:ComponentInfo{com.tencent.mm/com.tencent.mm.plugin.base.stub.WXPayEntryActivity},curName:ComponentInfo{com.tencent.mm/com.tencent.mm.plugin.wallet_index.ui.OrderHandlerUI}

2021-02-02 22:58:10.871 4052-17923/? I/GuardService: notifyChange! preName = ComponentInfo{com.tencent.mm/com.tencent.mm.plugin.base.stub.WXPayEntryActivity}; curName = ComponentInfo{com.tencent.mm/com.tencent.mm.plugin.wallet_index.ui.OrderHandlerUI}

2021-02-02 22:58:10.872 827-827/? D/DisplayFeatureHal: read panel temperature:30290

2021-02-02 22:58:10.874 32551-32551/? W/adbd: timeout expired while flushing socket, closing

2021-02-02 22:58:10.874 1817-13045/? I/Timeline: Timeline: App_transition_ready time:160105267

2021-02-02 22:58:10.875 3977-3977/? W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@8c02403

2021-02-02 22:58:10.876 1817-2013/? I/Timeline: Timeline: App_transition_ready time:160105268

2021-02-02 22:58:10.878 3977-3977/? E/Instrumentation: Uninitialized ActivityThread, likely app-created Instrumentation, disabling AppComponentFactory

    java.lang.Throwable

        at android.app.Instrumentation.getFactory(Instrumentation.java:1260)

        at android.app.Instrumentation.newActivity(Instrumentation.java:1251)

        at com.tencent.mm.splash.k.newActivity(SourceFile:61)

        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)

        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3443)

        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:2040)

        at android.os.Handler.dispatchMessage(Handler.java:107)

        at android.os.Looper.loop(Looper.java:224)

        at android.app.ActivityThread.main(ActivityThread.java:7520)

        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)

2021-02-02 22:58:10.882 1817-13045/? I/Timeline: Timeline: App_transition_ready time:160105274

回答关注问题邀请回答
收藏

3 个回答

  • 支付社区运营
    支付社区运营
    2021-02-03

    这个代码错误的问题,需要你们自己检查下的

    2021-02-03
    有用
    回复 2
    • 刘勇
      刘勇
      2021-02-04
      我看已经很多人提到这个问题了
      2021-02-04
      3
      回复
    • 喜洋洋
      喜洋洋
      2022-05-09
      我也遇到了
      2022-05-09
      回复
  • 风海
    风海
    2023-06-15
    在manifest里面的activity加上android:launchMode="singleTask"看看
    
    2023-06-15
    有用
    回复
  • 刘勇
    刘勇
    2021-02-02

    android 8,9正常,android 10 出现这个问题

    2021-02-02
    有用
    回复 3
    • 神经蛙
      神经蛙
      2021-02-26
      您好,这个您有解决吗
      2021-02-26
      回复
    • 盐加三勺
      盐加三勺
      2022-08-30
      这个问题是微信底层用的热更新框架Tinker,在Android 10上不支持热更新activity导致的,希望Tinker官方修复这个问题。
      2022-08-30
      1
      回复
    • Tom
      Tom
      2022-10-24回复盐加三勺
      可以解决吗
      2022-10-24
      回复
登录 后发表内容
问题标签