Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android cannot open my app

Tags:

java

android

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.

like image 323
Jon Avatar asked Dec 05 '25 21:12

Jon


2 Answers

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>
like image 126
tachyonflux Avatar answered Dec 08 '25 10:12

tachyonflux


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>
like image 27
Elltz Avatar answered Dec 08 '25 10:12

Elltz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!