Open chenranok opened 8 months ago
nativeactivity 很快调用到了 getPackageManager, mPluginActivity是在onCreate内才赋的值,这里Null而报异常 override fun getPackageManager(): PackageManager { //chenran99 -- // val pluginPackageManager = // PackageManagerInvokeRedirect.getPluginPackageManager(mPluginActivity.classLoader)
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type com.tencent.shadow.core.runtime.ShadowNativeActivity at com.tencent.shadow.core.loader.delegates.ShadowNativeActivityDelegate.getMPluginActivity(ShadowNativeActivityDelegate.kt:17) at com.tencent.shadow.core.loader.delegates.ShadowNativeActivityDelegate.getPackageManager(ShadowNativeActivityDelegate.kt:50) at com.tencent.shadow.core.runtime.container.NativePluginContainerActivity.getPackageManager(NativePluginContainerActivity.java:182) at com.android.internal.policy.PhoneWindow.(PhoneWindow.java:458)
at com.android.internal.policy.HwPhoneWindow.(HwPhoneWindow.java:92)
at com.android.internal.policy.HwPolicyFactoryImpl.getHwPhoneWindow(HwPolicyFactoryImpl.java:42)
at com.android.internal.policy.HwPolicyFactory.getHwPhoneWindow(HwPolicyFactory.java:50)
at android.app.Activity.attach(Activity.java:8116)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4014)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4252)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2618)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8673)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)