Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | giga |
Hi everyone
I have made a simple Godot game and exported it for Android. The app runs fine on the phone and on the Android TV. Alas, on Android TV it will not show in the list of apps, since it is not a native Android TV app I assume.
I know there are workarounds, like sideloading or making an Android TV native apk that will launch it, but I would rather just export it properly.
Is there a way to do this from Godot? Maybe a custom template build? I have practically zero Android dev experience.
edit:
I believe what needs to be done is use the custom build.
My understanding is that I need to add this activity to the manifest
<intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> </intent-filter>
As described here: link
I did not chage the manifest, wanted to try building it as-is first.
This is what I have done so far:
- I have made sure to have openjdk-8. Removed openjdk-11 completely.
- Checked Export template Manager for the matching version of the templates (redownloaded just in case - 3.2.3.stable installed)
- ‘Project > Install Android Build Template…’ - removed android dir and re-added like this
- ‘Editor>Settings>Export>Android’ - since non-custom build works, I just added SDK location /home/user/Adnroid/Sdk’, as mentioned in the guide.
- ‘Project>Export’ - checked ‘Custom Template>Use Custom Build’ On
Now export project returns:
JAVA_HOME not set and no ‘java’ command could be found in your PATH.
Which is strange, cause java is on the path - e.g. java -version works. But fine, I just add path and then behold:
Exit Code: 1
This is where I am stuck now.