当前位置:网站首页>Fragment addition failed error lookup
Fragment addition failed error lookup
2022-07-05 05:15:00 【ximen502_】
Find the reason according to the source code
Caused by: java.lang.IllegalArgumentException: No view found for id 0x7f0801a1 (com.exam.starseat:id/fl_out) for fragment StarFragment{
92bd796 (d41094b9-f8de-4eb5-9064-e75ab80d61b7) id=0x7f0801a1}
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:875)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1303)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:439)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2663)
at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManagerImpl.java:2613)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:246)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:542)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:210)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1334)
at android.app.Activity.performStart(Activity.java:7067)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2819)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1620)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6701)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:249)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
fragment Add failure
Class inheritance relation
onFindViewById In the end in FragmentActivity To implement inside ,activity The implementation is as follows :
Called fragmentActivity Self findViewById(int id) Method , This method is in the parent class Activity Is implemented as follows :
Method call again Window In abstract classes ,Window The implementation is as follows
If you use a not activity In the layout ViewGroup(FrameLayout) Add Fragment It's a mistake to report when you're in trouble , The crash error is shown at the beginning of the article .
Reference blog :https://blog.csdn.net/hwliu51/article/details/69841068#t0
Slightly rough typesetting
边栏推荐
- 小程序直播+电商,想做新零售电商就用它吧!
- xftp7与xshell7下载(官网)
- cocos_ Lua loads the file generated by bmfont fnt
- 用 Jmeter 工具做个小型压力测试
- UE fantasy engine, project structure
- Establish cloth effect in 10 seconds
- 2021-10-29
- Common database statements in unity
- PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
- C4D simple cloth (version above R21)
猜你喜欢
win10虚拟机集群优化方案
UE fantasy engine, project structure
Research on the value of background repeat of background tiling
Applet Live + e - commerce, si vous voulez être un nouveau e - commerce de détail, utilisez - le!
Create a pyGame window with a blue background
Unity3d learning notes
Heap sort summary
Count sort
Recherche de mots pour leetcode (solution rétrospective)
How to choose a panoramic camera that suits you?
随机推荐
Redis has four methods for checking big keys, which are necessary for optimization
使用命令符关闭笔记本自带键盘命令
Unity synergy
质量体系建设之路的分分合合
Django reports an error when connecting to the database. What is the reason
Common technologies of unity
发现一个很好的 Solon 框架试手的教学视频(Solon,轻量级应用开发框架)
2022/7/1學習總結
2022/7/2做题总结
Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
django连接数据库报错,这是什么原因
Learning notes of "hands on learning in depth"
Data is stored in the form of table
Unity card flipping effect
嵌入式数据库开发编程(五)——DQL
cocos_ Lua listview loads too much data
[turn]: OSGi specification in simple terms
2020-10-27
Generate filled text and pictures
2022/7/2 question summary