Boris
Boris

Reputation: 8941

Android app does not start (and is invisible!) on device

I have a strange problem with my Android app. When I start it from Netbeans, the app gets installed on my device (attached via USB). After that nothing happens. I also can't find the app anywhere on the device!! (no icon, no nothing). Still I know the app has been installed, because under the android settings, where it says "Manage Applications" (or something) the app is now listed and I can uninstall it.

I've tried the whole procedure with a blank HelloWorld app, which worked fine. Here an icon got created o the device and the app was started correctly by NetBeans.

So I guess there is something wrong with my app causing it not to appear in the phone's launcher?

EDIT: Here's the manifest:

<?xml version="1.0" encoding="utf-8"?>

<uses-sdk android:minSdkVersion="4" />

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name" android:debuggable="true">
</application>

Upvotes: 1

Views: 710

Answers (1)

Padma Kumar
Padma Kumar

Reputation: 20041

you need to add below line in your Main activity in androidmanifest file

<activity android:label="@string/app_name"
          android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
</activity>

Upvotes: 3

Related Questions