20B2
20B2

Reputation: 2141

Multiple application of xamarin android created

I'm learning Xamarin Android using Visual Studio 2017. Debugging the application using the emulator is very slow and tedious so I started using android phone to test and debug the application. At the initial stages, there was no any issue. But as the number of activities increases the number of application in the phone also increases.

Suppose I've TestActivity, TestDetailActivity and TestListActivity in my android project. While debugging the application in the phone, there would be application for each activity.

What is causing this to happen? What should I do to get only one application where all the activities are bundled together? Also it would be nice to get suggestion to improve the performance of the emulator.

Upvotes: 2

Views: 119

Answers (1)

20B2
20B2

Reputation: 2141

I've found what is causing multiple applications to get installed. While creating an activity I've set the MainLauncher=true.

[Activity(Label="MyActivity", MainLauncher=true]
public class MyActivity:Activity
{
     //Activity Code
}

After setting the MainLauncher=false or removing the MainLauncher attribute all together, multiple applications are not created anymore.

Upvotes: 1

Related Questions