Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install app using Android Studio

I am working on an app which does not have any launcher activity. But when I try to install that app from Android Studio's Run icon, it says, 'Error running XYZApp: Default Activity not found'

I did not see such issue ever in Eclipse.

Can anyone help to fix this issue? How can I install my app in device which doesn't have any Launcher Activity.

like image 225
AndroDev Avatar asked Mar 01 '26 14:03

AndroDev


2 Answers

Edit your configuration, and there in 'Launch' select 'Nothing' (or something else, what you want to run)

like image 159
Tomasz Czura Avatar answered Mar 03 '26 05:03

Tomasz Czura


You must be missing the action and category for your main activity in AndroidManifest file

just add the intent filers in your activity as below :

<activity
        android:name="com.example.MainActivity"
        android:label="XYZApp"
        android:theme="@android:style/Theme.NoTitleBar" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
like image 44
shadygoneinsane Avatar answered Mar 03 '26 05:03

shadygoneinsane



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!