Android Studio - App not installed on phone but works

I am using Android Studio to run my application on my phone and it works fine. But the app itself is never installed ... There is no icon in this menu. I have to "run" any time I want to test my application. I am not getting any errors.

I believe there is a problem 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>

      

+3


source to share


3 answers


You must add a 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>

      

+4


source


I had the same problem because android studio did not put this dependency in build.gradle file:



compile 'com.android.support:support-v4:23.3.0'

      

+2


source


Do not use direct debug-apk file for manual installation. If you want to install manually by copying the APK file to the repository,

  • Delete the auto-generated APK file located in /app/build/outputs/apk/debug/app-debug.apk

    1. Click Menu > Build > Build APK(s)

      . This creates a debug APK for you.

enter image description here

I am using Android Studios 3.0 Beta 7. This works for me.

+1


source







All Articles