当前位置:网站首页>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
边栏推荐
- cocos_ Lua loads the file generated by bmfont fnt
- Pause and resume of cocos2dx Lua scenario
- django连接数据库报错,这是什么原因
- [轉]: OSGI規範 深入淺出
- PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
- GameObject class and transform class of unity
- Do a small pressure test with JMeter tool
- 2020-10-27
- Embedded database development programming (zero)
- Research and investment forecast report of adamantane industry in China (2022 Edition)
猜你喜欢
随机推荐
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
Cocos2dx Lua registers the touch event and detects whether the click coordinates are within the specified area
3dsmax common commands
Lua determines whether the current time is the time of the day
Heap sort summary
win10虚拟机集群优化方案
When will Wei Lai, who has been watched by public opinion, start to "build high-rise buildings" again?
Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
Unity and database
Panel panel of UI
2022/7/2 question summary
Cocos progress bar progresstimer
Es module and commonjs learning notes
LeetCode之單詞搜索(回溯法求解)
Unity writes timetables (without UI)
嵌入式数据库开发编程(六)——C API
Download xftp7 and xshell7 (official website)
64 horses, 8 tracks, how many times does it take to find the fastest 4 horses at least
Ue4/ue5 illusory engine, material chapter, texture, compression and memory compression and memory
Development error notes









