Status Update
Comments
a1...@gmail.com <a1...@gmail.com> #2
1) Don't use app:navGraph in your XML
2) Get a reference to your NavController
3) Add your Navigator to the NavController
4) Call setGraph on the NavController
This relies on the fact that NavController waits until the graph is set before restoring state / doing anything at all.
Technically, the createFragmentNavigator() call in NavHostFragment is already called at the same time as your proposed onNavControllerCreated() method so as a workaround, you could override that method, add your Navigator, then return super.createFragmentNavigator().
ml...@google.com <ml...@google.com>
a1...@gmail.com <a1...@gmail.com> #3
The workaround with createFragmentNavigator() works, though it's not very elegant. Maybe the method could be renamed to createNavigators() and return a list or an array of Navigators?
Anyway, it is a good enough solution for now, so it is not very urgent.
In conclusion:
* I think that a better support for custom destinations should be provided before final release.
* I would suggest describing the "Add support for new destination types" section in the documentation in more details.
Thank you
a1...@gmail.com <a1...@gmail.com> #4
Definitely something we can do better on though :)
co...@sim.org <co...@sim.org> #5
Branch: androidx-master-dev
commit a2e68921841727237528c4ac7076d50af64663c8
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 17 16:46:28 2018
Make setGraph(int) and setGraph(NavGraph) act identically
Remove the auto restore functionality from NavController's
setGraph(int) method so that it functions identically to
setGraph(NavGraph).
This ensures that developers that manually are calling
setGraph() after adding custom navigators don't get
recreated too early.
Test: updated NavController test
BUG: 110763345
Change-Id: I51ae7c74451669d6bfed0fe84df445c2ff272e6e
M navigation/runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/runtime/src/main/java/androidx/navigation/NavController.java
bo...@google.com <bo...@google.com>
ya...@google.com <ya...@google.com> #6
This fix will be available in 1.0.0-alpha07
a1...@gmail.com <a1...@gmail.com> #7
Branch: androidx-master-dev
commit f40bad0faef05bded2d226711338e489309885ba
Author: Ian Lake <ilake@google.com>
Date: Tue Oct 23 21:03:24 2018
Ensure NavHostFragment calls setGraph on restore
If a graph is set on NavHostFragment via
NavHostFragment.create() or through
app:navGraph, it should be restored immediately
after the call to restoreState.
Test: testapp now works
BUG: 110763345
Change-Id: I7a0c656480e27a66637667519eabe61820b09a6c
M navigation/fragment/src/main/java/androidx/navigation/fragment/NavHostFragment.java
mr...@gmail.com <mr...@gmail.com>
ya...@google.com <ya...@google.com> #8
Hi,
please try to update to the latest emulator (33.1.6+), thanks!
a1...@gmail.com <a1...@gmail.com> #9
Launching a Pixel 4a AVD using API 33.
surfaceflinger (inside the AVD) still crashes if I set the renderer to "Desktop native OpenGL" and API level to "Compatibility".
Everything still works just fine if I set both settings to auto.
So, no change from 2 Feb, when I last reported that setting both things to auto fixed this.
ap...@rtwsa.com <ap...@rtwsa.com> #10
ya...@google.com <ya...@google.com>
ya...@google.com <ya...@google.com> #11
Hi,
If you got the chance, would you help to run the emulator again with -feature GLESDynamicVersion -verbose
, then send us both the emulator console output and logcat?
We are looking for the OpenGL ES version there, we want them to have GLES version number >=3.0 (Mac OpenGL core profile 4.1).
The logs in #7 and #2 have different version numbers. So we want to check if logcat gets the right version after using -feature GLESDynamicVersion
.
a1...@gmail.com <a1...@gmail.com> #12
Launching a Pixel 4a AVD using API 33 (revision 12).
I tried all combinations of Desktop/Swiftshader + Compatibility/Max. Only Desktop + Compatibility results in surfaceflinger crashing. I included the other logs as well in case they prove useful.
I noticed on the crashing one that surface flinger crashed just after the line "SurfaceFlinger: Enter boot animation" in logcat so I trimmed the other logcats shortly after that line (since they were otherwise over 2.5M).
Hopefully something in there helps...
ya...@google.com <ya...@google.com> #13
Thank you for your logs. That is extremely helpful. The logs showed that we sent a wrong GLES version number to the guest. I can narrow down the root cause now.
ya...@google.com <ya...@google.com> #14
Hi Devki,
please help to cp aosp/2620446 to next stable. Thanks!
de...@google.com <de...@google.com>
vk...@google.com <vk...@google.com> #15
de...@google.com <de...@google.com>
um...@gmail.com <um...@gmail.com> #16
Android Emulator / Virtual Device not working on M1 - 8GB(Unfortunately, your computer does not support hardware accelerated virtualization). Is the issue resolved to run android virtual device on M1 Mac- Ventura-V-13.2
ya...@google.com <ya...@google.com> #17
it looks like a different bug. Would you file a new issue with all the emulator console output attached? Thanks
Description
STEPS TO REPRODUCE:
1. Setup an AVD with API >30, arm64-v8a (Google APIs). In my case, I used Pixel 4a as the device (since that's what I have).
2. Start the emulator
API 30 works.
API 28 also works.
I assumed this was a temporary issue with API 31... but the issue persists with API 32 which makes testing things difficult without using my actual phone.
ATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
There's nothing to see, just the "Google" splash screen.
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
Emulator bug report thing doesn't work (because the system hasn't come up?), but I captured a logcat showing something crashing over and over again.
Android Studio Chipmunk | 2021.2.1 Patch 2
Build #AI-212.5712.43.2112.8815526, built on July 11, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.5.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin (212-1.7.10-release-333-AS5457.46)
Android Emulator 31.3.10 (installed by Android Studio)
MacBook Pro (14-inch, 2021)
macOS Monterey 12.5.1
M1 Pro CPU
16GB RAM