Im trying to add android.car API to Android Studio project. Since car classes are not available by default with sdk, i've done mm in .../car-lib and copied generated android.car.jar to app/libs and then right click on this in AS and -> Add as a library. After this Car Api classes are still not available. To make everything clear, here are steps I done:
/AOSP$ . build/envsetup.sh
/AOSP$ lunch full-eng
/AOSP$ cd packages/services/Car/car-lib
/AOSP/packages/services/Car/car-lib$ mm
Then copied android.car.jar from AOSP/out/target/product/generic/system/framework/android.car.jar to MyProject/app/libs. Then in Android Studio right click on android.car.jar and -> Add as a library (auto generate grandle implementation)
Ok, already got it.
Project Structure → + Module → import .Jar/AAR Package → Source:
AOSP/out/target/common/obj/JAVA_LIBRARIES/android.car_intermediates/classes-full-debug.jar
Then same with
AOSP/out/target/common/obj/JAVA_LIBRARIES/android.car_intermediates/classes.jar
Then add those modules as a module dependencies to your app module.