An Android Automotive app that was working fine in my car a couple months ago doesn’t start correctly now. The screen says “Application Error. Please report this error to the app developer” and there is a button that says “Close Application”. I cannot reproduce this in a debug build on the emulator, but I see it in a production build on both the emulator (Android 12 and 13) and vehicle (Android 12). Previous versions of the app that worked fine in the past also have this issue.
When I open it in the emulator, I can see the following crash stack trace:
Serialization failure in getAppInfo
androidx.car.app.serialization.Bundler$TracedBundlerException: Class to deserialize is missing a no args constructor: androidx.car.app.FailureResponse, frames: [FailureResponse, FailureResponse]
at androidx.car.app.serialization.Bundler.serializeObject(Unknown Source:125)
at androidx.car.app.serialization.Bundler.toBundle(Unknown Source:285)
at androidx.car.app.serialization.Bundleable.androidx.car.app.serialization.Bundler.toBundle(SourceFile:7)
at androidx.car.app.activity.renderer.surface.RemoteProxyInputConnection$$ExternalSyntheticLambda6.androidx.car.app.serialization.Bundleable.create(Unknown Source:25)
androidx.car.app.utils.RemoteUtils.lambda$sendFailureResponseToHost$4
androidx.car.app.utils.RemoteUtils$$InternalSyntheticLambda$1$00787579f7b110f935892f6d3a11e0cf6af59cc35bc9b41a1e55d24116f40963$0.call$bridge
at kotlinx.coroutines.DebugStringsKt.androidx.car.app.utils.RemoteUtils.dispatchCallToHostForResult(Unknown Source:36)
at kotlinx.coroutines.DebugStringsKt.androidx.car.app.utils.RemoteUtils.dispatchCallToHost(Unknown Source:0)
at kotlinx.coroutines.DebugStringsKt.androidx.car.app.utils.RemoteUtils.sendFailureResponseToHost(Unknown Source:12)
at androidx.car.app.activity.renderer.surface.RemoteProxyInputConnection$$ExternalSyntheticLambda6.androidx.car.app.utils.RemoteUtils.lambda$sendSuccessResponseToHost$3(Unknown Source:71)
androidx.car.app.utils.RemoteUtils$$InternalSyntheticLambda$1$00787579f7b110f935892f6d3a11e0cf6af59cc35bc9b41a1e55d24116f40963$0.call$bridge
at kotlinx.coroutines.DebugStringsKt.androidx.car.app.utils.RemoteUtils.dispatchCallToHostForResult(Unknown Source:36)
at kotlinx.coroutines.DebugStringsKt.androidx.car.app.utils.RemoteUtils.dispatchCallToHost(Unknown Source:0)
at kotlinx.coroutines.DebugStringsKt.androidx.car.app.utils.RemoteUtils.sendSuccessResponseToHost(Unknown Source:12)
at androidx.car.app.CarAppService$CarAppBinder.getAppInfo(Unknown Source:11)
at androidx.car.app.ICarApp$Stub.onTransact(Unknown Source:58)
at android.os.Binder.execTransactInternal(Binder.java:1285)
at android.os.Binder.execTransact(Binder.java:1244)
Caused by: java.lang.NoSuchMethodException: androidx.car.app.FailureResponse.<init> []
at java.lang.Class.getConstructor0(Class.java:2363)
at java.lang.Class.getDeclaredConstructor(Class.java:2201)
at androidx.car.app.serialization.Bundler.serializeObject(Unknown Source:15)
All of this code is in the Jetpack Car App library and I don’t call any of this code directly from my app. This stack trace is not being reported as a crash on Google Play or in my crash tracking software, so I believe Jetpack has its own handling for this type of crash.