I’m currently developing an Android TV app using Flutter, and I want to support only Android TV, excluding mobile and tablet devices. To achieve this, I modified the AndroidManifest.xml file by replacing:
<category android:name="android.intent.category.LAUNCHER"/>
with:
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
However, after making this change, when I try to run the app, I encounter the following error:
Error: package identifier or launch activity not found.
It seems that the app is no longer able to find the correct package identifier or launch activity. I suspect this might be related to the removal of the standard LAUNCHER category, but I’m not sure how to properly configure the manifest for an Android TV-only app.
What I’ve Tried:
Double-checked the AndroidManifest.xml file for any missing configurations.
Verified that the activity is still defined correctly with the appropriate LEANBACK_LAUNCHER category.
Ensured that the minSdkVersion and targetSdkVersion are compatible with Android TV.
Additional Information:
The app builds successfully, but fails to launch due to the mentioned error.
I’m using the latest version of Flutter.
Question:
How can I properly configure my Flutter app to support only Android TV, and what is causing this error when trying to run the app? Is there a specific setup required for Android TV that I’m missing?