Fixed
Status Update
Comments
py...@gmail.com <py...@gmail.com> #2
I have updated AS to version 4.1.3 and the android emulator to version 30.5.3.0. Now I can't use the emulator anymore. I have Mojave OS installed and I confirm the same message described in previous post. The file does not exist in the file system.
ch...@google.com <ch...@google.com> #3
As a workaround, I was able to successfully downgrade android emulator to 28.
See:
I downloaded 28.0.25.0 (build_id 5395263) from here:
I deleted everything EXCEPT package.xml from
$HOME/Library/Android/sdk/emulator/
and replaced them with the contents of the extracted zip file.
Finally, make sure your AVD system image is NOT running api 30.
sdkmanager "system-images;android-27;google_apis_playstore;x86"
System images higher than api 29 are using a kernel format that the older emulator cannot understand.
Here's a workaround script you can try:
cd ~
mkdir emulator_downgrade
cd emulator_downgrade
wget https://dl.google.com/android/repository/emulator-darwin-5395263.zip
unzip emulator-darwin-5395263.zip
mv ~/Library/Android/sdk/emulator ~/Library/Android/sdk/previous-emulator
mv emulator ~/Library/Android/sdk/emulator
cp ~/Library/Android/sdk/previous-emulator/package.xml
~/Library/Android/sdk/emulator/package.xml
cd ~
~/Library/Android/sdk/emulator/emulator -version
~/Library/Android/sdk/emulator/emulator -list-avds
ap...@google.com <ap...@google.com> #4
Thank you for the downgrade explanation. If you want to use a more recent emulator 30.1.5 the build number is 6855416. I believe you can use this build with API 30 images without issues.
Description
androidx.metrics
module used: metrics-performanceandroidx.metrics
version used: 1.0.0-alpha01I was reading the sources for
androidx.metrics.performance.DelegatingOnPreDrawListener#onPreDraw
and noticed what seems like a potential bug pre API 24 (or at list a limitation):androidx.metrics.performance.DelegatingOnPreDrawListener#onPreDraw
posts an async message (great) but not at the front.Pre API 24, the “end” time of a frame is approximated by posting an async message from onPreDraw.
This means there can be messages that were already posted and will execute before it runs. MessageQueue only looks for async messages when there’s a sync barrier, otherwise, they keep their posted order. So if there’s no sync barrier then any already enqueued message will execute right after the frame but before the message posted from onPreDraw runs, which means the frame end time will be off. If there is a sync barrier, this still applies if there are other async messages already posted.