Status Update
Comments
aa...@google.com <aa...@google.com>
rk...@google.com <rk...@google.com> #2
Another option is to provide a setContent
like API specifically for Fragments.
E.g., an extension like:
fun Fragment.content(content: @Composable () -> Unit): ComposeView {
return ComposeView(requireContext()).apply {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent(content)
}
}
which would let you write a Fragment like:
class ExampleFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
) = content {
// Write your @Composable content here
val viewModel: ExampleViewModel = viewModel()
// or extract it into a separate, testable method
ExampleComposable(viewModel)
}
}
bo...@google.com <bo...@google.com> #3
Branch: androidx-main
commit a066a43da39b518751bcbd5baed63decb657f3bb
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jan 16 22:11:03 2024
Add Fragment Compose module in Androidx
Adding Fragment Compose module using the create_project.py script.
RelNote: n/a
Test: ./gradlew updateApi
Bug: 258046948
Change-Id: Ia35d149c8ab0d78331206accf53e25a717f97291
M docs-tip-of-tree/build.gradle
A fragment/fragment-compose/api/current.txt
A fragment/fragment-compose/api/res-current.txt
A fragment/fragment-compose/api/restricted_current.txt
A fragment/fragment-compose/build.gradle
A fragment/fragment-compose/src/main/java/androidx/fragment/androidx-fragment-fragment-compose-documentation.md
M settings.gradle
ma...@gmail.com <ma...@gmail.com> #4
Branch: androidx-main
commit 561cb75bdf7e971f0ba2dec3cdc3286e1b415ecf
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Jan 16 23:53:00 2024
Add Fragment.content extension
Provides an easy integration for providing Compose content inside of a
Fragment that sets the ComposeView and ViewCompositionStrategy.
RelNote: "The new Fragment Compose module provides a Fragment.content
extension function to handle setting a Fragment's view in Compose."
Test: added test
Bug: 258046948
Change-Id: Ia166527918517593e94bcae239ff714df4dc00ad
M fragment/fragment-compose/api/current.txt
M fragment/fragment-compose/api/restricted_current.txt
M fragment/fragment-compose/build.gradle
A fragment/fragment-compose/src/androidTest/AndroidManifest.xml
A fragment/fragment-compose/src/androidTest/java/androidx/fragment/compose/FragmentTest.kt
A fragment/fragment-compose/src/androidTest/java/androidx/fragment/compose/test/TestActivity.kt
A fragment/fragment-compose/src/androidTest/res/layout/activity_main.xml
A fragment/fragment-compose/src/main/java/androidx/fragment/compose/Fragment.kt
rk...@google.com <rk...@google.com> #5
This has been fixed internally and will be available in the Fragment 1.7.0-alpha09
release.
ma...@gmail.com <ma...@gmail.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.wear.protolayout:protolayout-material-core:1.1.0-rc01
androidx.wear.tiles:tiles-tooling:1.3.0-rc01
androidx.wear.tiles:tiles-tooling-preview:1.3.0-rc01
rk...@google.com <rk...@google.com> #7
Thank you, please try adding -gpu swangle
(this is a software GPU, it will be slow), I think for whatever reason we can't talk to your GPU.
Please consider trying the latest version we have here:
ma...@gmail.com <ma...@gmail.com> #8
Could you please check this for me?
rk...@google.com <rk...@google.com> #9
DEBUG | emuglConfig_get_vulkan_hardware_gpu: Physical devices count is 0
Serdar, could you please take a look?
rk...@google.com <rk...@google.com> #10
Please check if you have crashreports and if you do consider uploading them (please attach crash ids here):
cd C:\Users\crazy\Desktop\CODING\AndroidSDK\emulator
crashreport.exe -l
crashreport.exe -u
ma...@gmail.com <ma...@gmail.com> #11
Microsoft Windows [Version 10.0.19045.5131]
(c) Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd C:\Users\crazy\Desktop\CODING\AndroidSDK\emulator
C:\Users\crazy\Desktop\CODING\AndroidSDK\emulator>crashreport.exe -l
C:\Users\crazy\AppData\Local\Temp\\AndroidEmulator\emu-crash-35.4.3.db\reports\fa3cbbcf-3433-4a63-9c3a-f4d9f8ba847a.dmp
C:\Users\crazy\Desktop\CODING\AndroidSDK\emulator>crashreport.exe -u
Report fa3cbbcf-3433-4a63-9c3a-f4d9f8ba847a is available remotely as: 9a9150ec7b65047e
C:\Users\crazy\Desktop\CODING\AndroidSDK\emulator>
rk...@google.com <rk...@google.com> #12
Thank you a lot! We got the crash. I think we can't handle zero of VK devices well :) Serdar should know more why we get zero VK devices.
Maybe we should return false
if deviceCount
is zero.
ma...@gmail.com <ma...@gmail.com> #14
If you have any specific steps or fixes in mind, I’d appreciate your guidance. I can also run additional tests like vulkaninfo or check my Vulkan configuration if needed.
rk...@google.com <rk...@google.com> #15
As I understand, Vulkan-Loader/issues/552 is talking about the case when there are two GPUs: an integrated AMD and a separate NVIDIA and somehow the AMD side prevents returning anything. If this is your case, I think the solution is to update the AMD GPU drivers.
ma...@gmail.com <ma...@gmail.com> #16
Hi bro, the AVD is working now! After uninstalling the driver and reinstalling the latest version, the AVD opens successfully. Thank you so much for your help and for taking the time to assist me!
rk...@google.com <rk...@google.com> #17
Thank you for confirming this. We will fix the crash, but all we can do is to say "Your system has no Vulkan devices, update drivers or something" and exit.
ma...@gmail.com <ma...@gmail.com> #18
ko...@google.com <ko...@google.com> #19
Thanks for reporting this, a change is submitted (aosp/3393546) and will be available in the next canary builds of the emulator to correctly give an error for zero device cases. I'll close this one now as the booting issue is resolved with a driver update.
an...@google.com <an...@google.com> #20
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Emulator 35.3.11 Stable
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
an...@google.com <an...@google.com> #21
Further fixes for this issue are now available in:
- Android Emulator 35.4.5 Canary
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description
####################################################
Please provide all of the following information, otherwise we may not be able to route your bug report.
####################################################
1. Describe the bug or issue that you're seeing.
Hi, my name is Max, and I’m currently experiencing an issue with my Android Virtual Device (AVD). After creating the AVD, I’m unable to open it. The system keeps displaying a pop-up error stating that the AVD has terminated.
I checked the log file, and it shows the following error:
" 2024-12-04 19:07:57,970 [ 676451] INFO - Emulator: Pixel 9 Pro XL API 30 - [4504:2088:20241204,190757.970:ERROR filesystem_win.cc:130] GetFileAttributes C:\Users\crazy\AppData\Local\Temp\AndroidEmulator\emu-crash-35.2.10.db\attachments\4adcdf86-281b-417e-b896-b530668bbdcf: The system cannot find the file specified. (2) "
When I checked the file location, the folder was empty. Can u help solve about this ? Thank you!
2. Attach log files from Android Studio
2A. In the IDE, select the Help..Collect Logs and Diagnostic Data menu option.
2B. Create a diagnostic report and save it to your local computer.
2C. Attach the report to this bug using the Add attachments button.
3. If you know what they are, write the steps to reproduce:
3A. Unable to open the AVD
3B. Cannot file the attactments file
3C.
In addition to logs, please attach a screenshot or recording that illustrates the problem.
For more information on how to get your bug routed quickly, see
Build: AI-242.23339.11.2421.12700392, 202411230116
AS: Ladybug | 2024.2.1 Patch 3
AI-242.23339.11.2421.12700392, JRE 21.0.3+-12282718-b509.11x64 JetBrains s.r.o., OS Windows 10(amd64) v10.0 , screens 1920x1080 (100%), 1920x1080 (125%)
Android Gradle Plugin: 8.7.3
Gradle: 8.9
Gradle JDK: JetBrains Runtime 21.0.3
NDK: from local.properties: (not specified), latest from SDK: (not found)
CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
Source: send_feedback_icon```