Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - App not installed onto phone, but runs

I use Android Studio to run my app on my phone and it runs fine. But the application itself is never installed... There is no icon for it in the menu. I have to "run" any time I want to test my app. I am presented with no errors.

I believe there is an issue with my manifest. What am I doing wrong here?:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="jb854.eda.kent.ac.uk.edanews">

    <uses-feature
        android:name="android.software.leanback"
        android:required="false" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <application
        android:name=".EDANewsApplication"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".activity.MainActivity"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:scheme="http" android:host="www.eda.kent.ac.uk" android:pathPrefix="/school/"/>
            </intent-filter>

        </activity>
        <activity
            android:name=".activity.CommentsActivity"
            android:theme="@style/AppTheme.TransparentActivity" />
        <activity
            android:name=".activity.ArticleActivity"
            android:theme="@style/AppTheme.TransparentActivity" />
        <activity
            android:name=".activity.FullscreenImageActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/title_activity_fullscreen_image"
            android:theme="@style/AppTheme.TransparentActivity" />
        <activity
            android:name=".activity.FavouritesActivity"
            android:label="@string/title_activity_favourites"
            android:theme="@style/AppTheme.TransparentActivity" />

    </application>
</manifest>
like image 551
Jonty800 Avatar asked May 03 '15 15:05

Jonty800


People also ask

Why app is not installing in my phone from Android Studio?

The Android app not installed error can be combated after resetting app permissions. Go to Settings > Apps > Reset App Preferences/Reset Application Permissions. After this, third-party software can be installed on your device.

Why my APK is showing app not installed?

By default Android allows installation only from the Play Store. In order to allow installation of apps from other sources, open the Settings app and locate "Install Unknown Apps" under Privacy/Security settings. Enable the permission for the app which you use to install your APK.


1 Answers

You should add category LAUNCHER and action MAIN to your MainActivity:

<activity
    android:name=".activity.MainActivity"
    android:windowSoftInputMode="adjustResize">
    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <action android:name="android.intent.action.MAIN"/>

        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <category android:name="android.intent.category.LAUNCHER"/>

        <data android:scheme="http" android:host="www.eda.kent.ac.uk" android:pathPrefix="/school/"/>
    </intent-filter>

</activity>
like image 164
Mattia Maestrini Avatar answered Sep 27 '22 19:09

Mattia Maestrini