android / performance-samples

Samples to show APIs and best practices in Performance on Android
https://d.android.com/topic/performance/overview
Apache License 2.0
1.26k stars 213 forks source link

The baseline profile install broadcast was not received. This most likely means that the profileinstaller library is missing from the target apk #135

Closed beyondckw closed 2 years ago

beyondckw commented 2 years ago

I change the compilationMode to CompilationMode.Partial,other the same as origin project AS: bumblebee

@Test
    fun startup() = benchmarkRule.measureRepeated(
        packageName = TARGET_PACKAGE,
        metrics = listOf(StartupTimingMetric()),
        compilationMode = CompilationMode.Partial(),
        iterations = 5,
        startupMode = StartupMode.COLD
    ) {
        pressHome()
        startActivityAndWait()
    }
mlykotom commented 2 years ago

Could you try adding implementation("androidx.profileinstaller:profileinstaller:1.2.0-alpha01") as a dependency to your app? You probably already have it as transitive dependency coming with Jetpack Compose. The 1.2.0 version adds support Android 12 + devices.

beyondckw commented 2 years ago

I already added implementation("androidx.profileinstaller:profileinstaller:1.2.0-alpha02")

mlykotom commented 2 years ago

Could you give us more details on what device, OS version do you run the benchmarks? Thank you

beyondckw commented 2 years ago

oneplus a5010 , android 11

qavan commented 2 years ago

same on honor 9c

mehmet6parmak commented 2 years ago

same on huawei mate 20 pro

mehmet6parmak commented 2 years ago

It worked after turning off battery optimizations. Hope this helps to others.

mlykotom commented 2 years ago

Thanks for the info! @tikurahul is this something we could take care of internally?

roliveiravictor commented 1 year ago

Huawei mate 20 pro - Adding androidx.profileinstaller:profileinstaller:1.2.0, turning off battery optimizations and disabling (might stuck the app restart if not) the app launch manager has solved my issue.

hellosagar commented 1 year ago

It's still happening, even tho I've the dependency added :(

  implementation("androidx.profileinstaller:profileinstaller:1.3.1")
sadighasanzade commented 10 months ago

Turn off the battery optimisation and it will work.

dil33p commented 9 months ago

Even I am facing the same issue,not working with MotoE, OnePlus and Pixel. Could there be any other issue. I am using implementation("androidx.profileinstaller:profileinstaller:1.3.1") with Gradle 8.2

CedrickFlocon commented 3 months ago

it also seems that debuggable application lead to this error.