I have an issue I cannot seem to find the answer for.
I've been browsing the web for hours, I found people with similar issues and errors, but those problems have been solved with proper code which I already did implement ( error is not due to my code being broken. Up to date tutorials backs me up..(?) ), in my case my app worked fine during the majority of it's developing stage. But as I implemented an adView, my app suddenly started getting this error. I removed the Ad implementation but the error remains..
- I have been looking at: Android Fragment no view found for ID? But had no luck there.
- I've Rebuilt, cleaned, restarted both android studio and my computer.
- I peaked into R to see if fragment_layout had the assigned Id '0x7f09006d'.
- I've tried changing name from fragment_layout to anything else, but no luck, also made a new content_main.xml to try it.
- I'm using 27.1.1 implementations. Compile version 27, target 27, min 17.
I'm having a activity_main.xml with a drawer layout, that (app_bar_main.xml).
app_bar_main.xml does a (content_main.xml).
Content_main.xml's rootView has the ID of fragment_layout.
(This is standard template when creating a drawer layout Activity)
This is how I change to the fragments, using fragment_layout
compare_loan compareLoan = new compare_loan();
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, compareLoan, compareLoan.getTag()).commit();
(I get the following error:
java.lang.IllegalArgumentException: No view found for id 0x7f09006d (com.something.somethingelse.appname:id/fragment_layout) for fragment compare_loan{aee705c #0 id=0x7f09006d}
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1422)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2596)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2383)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2338)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2245)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:703)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
12-13 17:57:48.000 25339-29001/system_process E/memtrack: Couldn't load memtrack module
Anyone has any clue? As said it has been working fine for days. No big changes could have affected this. Only thing I can point out is adView implementation. Which is now removed from 'implementation' now.
I hope this makes sense for you guys. This is my first post. I hope to provide a solution if I find one.