3

When I debug an app written in Android Studio on my devices (Galaxy Note 3 and Ouya) The app debugs fine and runs on the devices, however the app never appears in the app drawer so I can not run it on a disconnected device (ie show other people the app running when away from my dev computer). My apps used to install as runnable apps but this no longer appears to happen. The app is however listed in Application Manager as an App I can uninstall, close etc.

Why does the app no longer appear in my app drawer?

-------------------------------update--------------------------

This is my manifest file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.frd.game" >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.frd.game.GameRun"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.Main" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

------------Update---------------

I have now tried to install the apk manually via the adb command and exactly the same thing happens (ie App appears in application manager but not in app drawer) So that rules out the issue being with android studio

------Update-----

I have now manually installed another test app (not a gradle one as far as I know) and it installs fine, the manifest is pretty much identical to the one I have above although obviously with different package name.

coolblue2000
  • 3,796
  • 10
  • 41
  • 62

3 Answers3

3

I was able to solve this same issue by temporarily changing the name of the application.

android:label="temp"

Run the application on the device. Check to see if the icon now shows up in the app drawer. If it does, you should be able to change the label back to the original name.

android:label="@string/app_name"
Andrew H
  • 321
  • 4
  • 9
0

Make sure you have a "default" activity, by having the necessary intent filter. See here: Default Activity not found in Android Studio

Make sure MAIN in the category is in all caps.

Then if you have a Gradle based project, run

./gradlew installDebug

Community
  • 1
  • 1
yogurtearl
  • 3,035
  • 18
  • 24
  • Yes I have a default activity. The app runs in debug fine. It just never appears in my list of apps afterwards which used to happen when I debugged with eclipse. With eclipse if I disconnect the usb cable the app is still runnable on the device as it was installed as a normal app. With android studio this does not happen. – coolblue2000 May 12 '14 at 06:28
  • Do you have a tag on the activity? – Scott Barta May 12 '14 at 21:20
  • Yes I have the category tag – coolblue2000 May 13 '14 at 12:52
  • I have noticed that the remote path that android studio installs the apk too is /data/local/tmp/.... Is this the issue? – coolblue2000 May 13 '14 at 12:53
0

In my case, I had specified productFlavors, and you have to take those into account when using Gradle.

From the docs:

The "Debug" part in the above task names is just a camel-case version of the build variant name, so it can be replaced with whichever build variant you want to assemble or install. For example, if you have a "demo" product flavor, then you can build the debug version with the assembleDemoDebug task.

So first you would run gradlew tasks to check the list of available install tasks, which appears like this:

Install tasks
-------------
installArm7Debug - Installs the DebugArm7 build.
installArm7DebugAndroidTest - Installs the android (on device) tests for the Arm7Debug build.
installArm7Release - Installs the ReleaseArm7 build.

And then you would run gradlew <install task> , for example, gradlew installArm7Debug.

RominaV
  • 3,335
  • 1
  • 29
  • 59