Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find symbol androidx.car.app.SessionInfo

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 sessioninfo

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"

like image 818
Omi Avatar asked Feb 12 '26 13:02

Omi


1 Answers

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

like image 82
Rafael Volpato Avatar answered Feb 15 '26 01:02

Rafael Volpato



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!