I am trying to write an app for Android Automotive OS and am replicating an example from this git: https://github.com/android/car-samples I am specifically trying to build the HelloWorldService for Automotive.
But I cant seem to get the SessionsInfo import working

I can see the others inside the androidx.car.app are available. Any idea why the sessioninfo is not found? I am running Android Studio Electric Eal 2022.1.1 Patch 2, Gradle JDK is set to "Android Studio default JDK - 11.0.15"
Update your dependency to version to (at least) 1.3.0-alpha01:
inside file build.gradle replace
implementation "androidx.car.app:app:1.2.0-rc01"
by
implementation "androidx.car.app:app:1.3.0-alpha01"
The class androidx.car.app.SessionInfo was introduced on version 1.3.0-alpha01
https://androidx.tech/artifacts/car.app/app/1.3.0-alpha01-source/androidx/car/app/SessionInfo.java.html
** Edit Opened a pull request on google repository to fix it https://github.com/android/car-samples/pull/42
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With