futuredapp / kmp-futured-template

Template for creating Kotlin Multiplatform applications at Futured.
24 stars 2 forks source link

Baseline profiles don't work on CI #89

Open Syntey opened 2 months ago

Syntey commented 2 months ago

Baseline profile works locally, but do not work on Android Google Play Release action.

xmadera commented 1 month ago

As is, the action throws Cannot query the value of this property because it has no value available

When updating libs, mainly baselineProfile to 1.3.0, it throws AVD Emulator package is not downloaded. Failed to retrieve hardware defaults for virtual device.

When changing the ManagedVirtualDevice api level below 34, it throws:

Failed to install the following Android SDK packages as some licences have not been accepted.
        system-images;android-31;google_apis;x86_64 Google APIs Intel x86_64 Atom System Image
     To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
     All licenses can be accepted using the sdkmanager command line tool:
     sdkmanager.bat --licenses
     Or, to transfer the license agreements from one workstation to another, see https://developer.android.com/studio/intro/update.html#download-with-gradle

When adding the accepting licenses step to the workflow like this:

      - name: Accept Android licenses
        run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true

It throws:

 The emulator failed to open the managed device to generate the snapshot.
     This is because the emulator closed unexpectedly, try updating the emulator and
     ensure a device can be run from Android Studio.

Which is an error that is tracked here: https://issuetracker.google.com/issues/298260499

There's also this error:

Failed to create Emulator snapshot image (1/5). Error: com.android.build.gradle.internal.AvdSnapshotHandler$EmulatorSnapshotCannotCreatedException: Gradle was not able to complete device setup for: dev33_google_atd_x86_64_Pixel_6
The emulator failed to open the managed device to generate the snapshot.

Which could be related to https://issuetracker.google.com/issues/287312019