Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConversationFragment 报错 #898

Open
Hichencha opened this issue Jan 20, 2025 · 3 comments
Open

ConversationFragment 报错 #898

Hichencha opened this issue Jan 20, 2025 · 3 comments

Comments

@Hichencha
Copy link

Fragment g0{7ebb3bf} not attached to a context.
androidx.fragment.app.Fragment.requireContext(Fragment.java:32) 出错堆栈
androidx.fragment.app.Fragment.requireContext(Fragment.java:32)
androidx.fragment.app.Fragment.getResources(Fragment.java:1)
conversation.g0.k2(ConversationFragment.java:294)
conversation.g0.l0(ConversationFragment.java:1)
conversation.b0.run(R8$$SyntheticClass:3)
android.os.Handler.handleCallback(Handler.java:996)
android.os.Handler.dispatchMessage(Handler.java:110)
android.os.Looper.loopOnce(Looper.java:210)
android.os.Looper.loop(Looper.java:302)
android.app.ActivityThread.main(ActivityThread.java:9652)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:601)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1062)

@imndx
Copy link
Contributor

imndx commented Jan 21, 2025

demo 上能复现吗?如何复现?会不会是你们自己的改动导致的?

看了下 demo 的代码,ConversationFragment里面,就一个地方用到getResource方法,感觉这个地方不会出问题。

private void setupMultiMessageAction() {
multiMessageActionContainerLinearLayout.removeAllViews();
List<MultiMessageAction> actions = MultiMessageActionManager.getInstance().getConversationActions(conversation);
int width = getResources().getDisplayMetrics().widthPixels;
for (MultiMessageAction action : actions) {

@Hichencha
Copy link
Author

这个类还是使用的源码,出现频率还是挺高的

@imndx
Copy link
Contributor

imndx commented Jan 23, 2025

你上面贴的日志是混淆后的,你还原之后,看看具体是哪一行、那个方法导致的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants