Jon
Jon

Reputation: 121

android cannot open my app

I have built the .apk for a little application I wrote for android. On the installation finished screen the "Open" option is grayed out and can not be chosen. After when I search the device for the application no icon appears, if I check installed apps it is there but still cannot be opened. I believe this is a problem with the androidmanifest.xml. I have very little experience with the androidmanifest and mostly just work with java.

<application

    android:allowBackup="true" android:label="@string/app_name"
    android:icon="@mipmap/ic_launcher" android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name">
        <intent-filter>
          <action android:name="android.intent.action.MAIN"/>
          <category android:name="andriod.intent.category.LAUNCHER"/>
            </intent-filter>







        </activity>





</application>

Above is my manifest, I understand my manifest probably has many errors so thank you for your help and patients in advance.

Upvotes: 3

Views: 113

Answers (3)

tachyonflux
tachyonflux

Reputation: 20211

The default launcher intent:

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

Upvotes: 2

Elltz
Elltz

Reputation: 10859

is this a typo ?

intent-filter>
      <action android:name="android.intent.action.MainActivity"/>
        </intent-filter>

it should be like this

<intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

Upvotes: 2

X7S
X7S

Reputation: 519

Your intent-filter is wrong, that's the reason why android won't create an icon. Just have a quick Google lookup or create a new project and copy the intent-filter out of the Manifest.

Upvotes: 1

Related Questions