I have built an app via Android Studio. The build is successful. I have created an APK file successfully. It is signed.
I have downloaded the APK to my device. It is found and unpacks successfully. I get the ‘install anyway’ prompt and it installs.
However, only the Done button is active, the Open button is disabled.
When I look for the app on my device icons (all screens not just home) it is not there. If I open Settings > Apps it is there.
What is going on? Surely if if is corrupt it wouldn’t build or it would fail to launch but this is both installed and not installed at the same time.
Thanks.
EDIT: To be clear, in Settings > Apps I see the app and it says Installed but if I search for the app on my phone it is not found.
AndroidManifest as follows (this was built from new project):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ts_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:targetApi="31">
<activity
android:name=".MainActivity" />
</application>
Thanks everyone – I somehow lost my Launcher section of my Manifest. Working version below.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application>
<activity
android:name=".MainActivity"
android:allowBackup="true"
android:exported="true"
android:icon="@mipmap/ts_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:targetApi="31">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
2
Answers
Make sure you have a launcher activity from where you are going to launch the webview.
Your manifest should contain something similar to this.
An application intended to run on TV devices must declare a launcher activity for TV in its manifest. It uses a CATEGORY_LEANBACK_LAUNCHER intent filter to do this. This filter identifies your app as being enabled for TV and lets Google Play identify it as a TV app. When a user selects your app on their TV home screen, this intent identifies which activity to launch.
If you are building your app to run in TV devices as well, you should add the intent-filter to the activity:
If you don’t include the CATEGORY_LEANBACK_LAUNCHER intent filter in your app, it’s not visible to users running Google Play on TV devices. Also, if your app doesn’t have this filter when you use developer tools to load it onto a TV device, the app does not appear in the TV user interface.
https://developer.android.com/training/tv/start/start