Android Auto Error running 'helloworld.mobile': Unable to determine activity name

38 views Asked by At

i'am new to android auto developement so i followed those guide line : https://developer.android.com/training/cars?hl=fr After that i found out that they had at github with prebuild project to make your first step on android auto here is the link : https://github.com/android/car-samples/tree/main/car_app_library

So i wanted to tryout the welloworld project to see how to set up a project on android auto. So i build the helloworld.mobile and tried to launch it on my mobile.

But when i tried to run i got this error : Error running 'helloworld.mobile': Unable to determine activity name

The only thing i changed in the code was updating :

`@Override
    @NonNull
    public Session onCreateSession(@NonNull SessionInfo sessionInfo) {
        return new Session() {
            @Override
            @NonNull
            public Screen onCreateScreen(@Nullable Intent intent) {
                return new HelloWorldScreen(getCarContext());
            }
        };
    }`

to this :

@NonNull
    @Override
    public Session onCreateSession() {
        return new Session() {
            @Override
            @NonNull
            public Screen onCreateScreen(@Nullable Intent intent) {
                return new HelloWorldScreen(getCarContext());
            }
        };
    }

Because the method signature of onCreateSession has been changed. I doubt that the problem but i prefer to specify it.

Here is the result of the consol :

$ adb shell am start -n "androidx.car.app.sample.navigation/androidx.car.app.sample.navigation.common.app.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER --splashscreen-show-icon 

Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=androidx.car.app.sample.navigation/.common.app.MainActivity }

Open logcat panel for device
Connected to process 4782 on device 'device'.

So i don't get why i can't start this basic application that is provided by google for testing android auto

0

There are 0 answers