Status Update
Comments
cc...@google.com <cc...@google.com> #2
Make sure you are passing your full package name in to targetPackage=
Can you try running the following command: adb shell cmd package compile -f -m <yourpackagename>
? That will fully compile your app on the device, without the macrobenchmark library involved.
Can you also try running adb shell cmd package compile -f -m com.example.macrobenchmark.target
That will let us narrow down if something is wrong with how macrobench attempts to compile the app, or if it's a problem with the emulator not supporting compilation like this for some reason.
ka...@gmail.com <ka...@gmail.com> #3
Hi,
Thanks for the suggestion. After testing the following scenarios in the macrobenchmark sample, I noted below points:
- Working fine for 1.1.0 versions
- Not working even on sample on 1.2.0 (Same error)
- Same error on terminal command (The commands you gave needs to something like
adb shell cmd package compile -f -m speed-profile com.example.macrobenchmark.target
- From what I can see in code, previously there was no check on the result of compilation and so they were working.
- There are no other logs/msg even on terminal so it's hard to explain any particular reason.
Thanks
cc...@google.com <cc...@google.com> #4
My guess is that the 1.1.0 version worked because it didn't validate that compilation was successful, and swallowed the error silently.
Rahul, I'm not able to get that ARM emulator running on my machine, can you try on your mac?
ra...@google.com <ra...@google.com> #5
I tried to reproduce the bug using an emulator on an M1 Pro:
I used MacrobenchmarkSample, the latest AGP + Gradle and ran TrivialBaselineProfileBenchmark
. I am able to generate baseline profiles correctly.
diff --git a/MacrobenchmarkSample/build.gradle b/MacrobenchmarkSample/build.gradle
index 65b035d..0bcd1ce 100644
--- a/MacrobenchmarkSample/build.gradle
+++ b/MacrobenchmarkSample/build.gradle
@@ -17,14 +17,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
- agpVersion = '7.3.0'
+ agpVersion = '8.0.0-alpha08'
targetSdkVersion = 33
minSdkVersion = 21
compileSdkVersion = 33
activityVersion='1.6.1'
appcompatVersion='1.5.1'
- benchmarkVersion = "1.1.0"
+ benchmarkVersion = "1.2.0-alpha07"
composeCompilerVersion = "1.3.1"
composeUiVersion = "1.3.0"
constraintLayoutVersion='2.1.4'
@@ -36,7 +36,7 @@ buildscript {
kotlinVersion = "1.7.10"
lifecycleVersion = '2.5.1'
materialVersion='1.7.0'
- profileInstallerVersion = '1.2.0'
+ profileInstallerVersion = '1.3.0-alpha02'
testExtVersion = '1.1.3'
tracingVersion = '1.1.0'
uiAutomatorVersion = '2.2.0'
wd...@gmail.com <wd...@gmail.com> #6
Try to run on emulator with apiLevel = 30. I changed the apiLevel to 31 then the issue is gone. my config:
pixel2Api30(com.android.build.api.dsl.ManagedVirtualDevice) {
device = "Pixel 2"
apiLevel = 30
systemImageSource = "google"
}
By the way, how do I specify which comment I want to replay?
ra...@google.com <ra...@google.com>
af...@gmail.com <af...@gmail.com> #7
This is happening on Wear OS emulator (arm64), API 30. There is no other Wear OS emulator available for arm64 so this is pretty much a blocker.
yu...@schimke.ee <yu...@schimke.ee> #8
This is failing for me on Wear 30, arm64.
Trying the command listed above locally also fails.
❯ adb shell cmd package compile -f -m dev.johnoreilly.confetti
Error: "dev.johnoreilly.confetti" is not a valid compilation filter.
❯ adb shell cmd package compile -f -m speed-compile dev.johnoreilly.confetti
Error: "speed-compile" is not a valid compilation filter.
Trying the command that I think macrobenchmark is using also fail.
❯ adb shell cmd package compile --reset dev.johnoreilly.confetti
Failure: package dev.johnoreilly.confetti could not be compiled
Can we reopen?
yu...@schimke.ee <yu...@schimke.ee> #9
cc...@google.com <cc...@google.com> #10
Over to Marcello to see if it's a dupe of
Should also file a bug like
ma...@google.com <ma...@google.com> #11
Yes, it's a dupe of
I noticed that all the reports here refer to api 30 arm, that is the version missing dex2oat.
I also stumbled upon this with
af...@gmail.com <af...@gmail.com> #12
I am not able to see this issue on the Wear OS 4 Preview emulator 🎉
ma...@google.com <ma...@google.com> #13
Yeah, the problem seems to be only on api 30 arm that is missing dex2oat, while wear os 4 is on api 33 I believe.
I'm keeping this open until api 30 image is fixed. The emulator team is aware of this.
pr...@google.com <pr...@google.com> #14
gi...@google.com <gi...@google.com> #15
I believe the issue is not that dex2oat is missing, but rather that we're not using the right one (looking for dex2oat32, whereas we should be using dex2oat64).
The fix is probably as simple as including
ma...@google.com <ma...@google.com> #16
The issue on api 30 emulator has been fixed. Once the new emulator image has been released this can be closed.
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com> #17
Just tested after updating the sdk and it worked. This can be closed.
be...@google.com <be...@google.com> #18
In
cc...@google.com <cc...@google.com>
ra...@google.com <ra...@google.com>
rk...@google.com <rk...@google.com>
bo...@google.com <bo...@google.com> #19
you can temporarily use google_apis for api30, I will update atd image soon
an...@google.com <an...@google.com> #21
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Canary 5
- Android Gradle Plugin 8.3.0-alpha05
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!
Description
Hi,
While running test to generate baseline profile (also other tests) on emulator (details below), I am getting following error on my work app.
Tests are working fine on another emulator with google services (Api 33). I am unable to download Android 12 non-google images on my system so not able to verify on other emulators for baseline profile.
Component used: Macrobenchmark - Baseline Profiles / Other startup tests
Version used: 1.2.0-alpha02
Emulator:
Device:
Error:
Do let me know if you need anything else.