Activity Not starting ; another activity is starting instead : I am facing a very weird issue. I am trying to launch one activity but instead of that, another activity is opening. I am trying to open RegActivity, I do have specified it in mainfiest and also made it Launcher activity but instead of that when I run the app "MainActivity" is calling. MainActivity is not even a Launcher or Default activity. I cleaned up the project, Rebuilt it. But still, Nothing works. I am stuck. I have wasted my entire day and nothing helped me. Please help Guys!!!

    MainFiest
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.abc.ecommerce" >
    
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.CALL_PHONE" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.READ_PHONE_STATE" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
        <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
        <uses-permission android:name="android.permission.GET_TASKS" />
        <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
        <uses-permission android:name="android.permission.VIBRATE" />
    
        <uses-feature
            android:glEsVersion="0x00020000"
            android:required="true" />
    
        <application
            android:allowBackup="true"
            android:hardwareAccelerated="true"
            android:icon="@drawable/ic_launcher"
            android:label="Frizzy"
            android:theme="@style/AppTheme2" >
            <activity
                android:name="com.solodroid.ecommerce.RegActivity"
                android:label="@string/app_name"
                android:theme="@style/AppTheme.NoActionBar"
                >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity
                android:name="com.solodroid.ecommerce.MainActivity"
                android:label="@string/app_name"
                android:screenOrientation="portrait" >
    
            </activity>
            <activity
                android:name="com.solodroid.ecommerce.ActivityCategoryList"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityMenuList"
                android:configChanges="keyboardHidden|orientation"
                android:screenOrientation="portrait"
                android:windowSoftInputMode="stateHidden" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityMenuDetail"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityCart"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityCheckout"
                android:configChanges="keyboardHidden|orientation"
                android:screenOrientation="portrait"
                android:windowSoftInputMode="stateHidden" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityConfirmMessage"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityContactUs"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityProfile"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityInformation"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.ActivityAbout"
                android:screenOrientation="portrait" />
            <activity
                android:name="com.solodroid.ecommerce.LoginActivity"
                android:screenOrientation="portrait"
                android:theme="@style/AppTheme.NoActionBar"/>
    
            <service android:name="com.parse.PushService" />
    
            <receiver android:name="com.parse.ParseBroadcastReceiver" >
                <intent-filter>
                    <action android:name="android.intent.action.BOOT_COMPLETED" 
                   />
                    <action android:name="android.intent.action.USER_PRESENT" />
                </intent-filter>
            </receiver>
        </application>
    
    </manifest>

    RegActivity.java
    package com.abc.ecommerce;
    
    import android.content.Intent;
    import android.os.AsyncTask;
    import android.os.Bundle;
    import android.support.v7.app.AppCompatActivity;
    import android.util.Log;
    import android.view.View;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.TextView;
    import android.widget.Toast;
    
    import org.json.JSONException;
    
    import java.io.IOException;
    import java.util.HashMap;
    
    public class RegActivity extends AppCompatActivity {
    
        private EditText etid, etname, etstorename, etemail, etphone, etdoj;
        Button btnregister;
        TextView tvlogin;
        private ParseContent parseContent;
        PreferenceHelper preferenceHelper;
        private final int RegTask = 1;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_reg);
    
            preferenceHelper = new PreferenceHelper(this);
            parseContent = new ParseContent(this);
    
            if(preferenceHelper.getIsLogin()){
                Intent intent = new Intent(RegActivity.this,MainActivity.class);
                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);
                this.finish();
            }
    
            //etid = (EditText) findViewById(R.id.etmi_id);
            etname = (EditText) findViewById(R.id.etname);
            //etstorename = (EditText) findViewById(R.id.etstore_name);
            etemail = (EditText) findViewById(R.id.etemail);
            etphone = (EditText) findViewById(R.id.etphone);
           // etdoj = (EditText) findViewById(R.id.etdoj);
            btnregister = (Button) findViewById(R.id.btn);
            tvlogin = (TextView) findViewById(R.id.tvlogin);
    
            tvlogin.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Intent intent = new Intent(RegActivity.this,LoginActivity.class);
                    startActivity(intent);
                }
            });
    
            btnregister.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    try {
                        register();
                    } catch (IOException e) {
                        e.printStackTrace();
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
            });
    
        }
    
        private void register() throws IOException, JSONException {
    
            if (!AndyUtils.isNetworkAvailable(RegActivity.this)) {
                Toast.makeText(RegActivity.this, "Internet is required!", Toast.LENGTH_SHORT).show();
                return;
            }
            AndyUtils.showSimpleProgressDialog(RegActivity.this);
            final HashMap<String, String> map = new HashMap<>();
           // map.put(AndyConstants.Params.MI_ID, etid.getText().toString());
            map.put(AndyConstants.Params.NAME, etname.getText().toString());
           // map.put(AndyConstants.Params.STORE_NAME, etstorename.getText().toString());
            map.put(AndyConstants.Params.EMAIL, etemail.getText().toString());
            map.put(AndyConstants.Params.PHONE, etphone.getText().toString());
            //map.put(AndyConstants.Params.DOJ, etdoj.getText().toString());
            new AsyncTask<Void, Void, String>(){
                protected String doInBackground(Void[] params) {
                    String response="";
                    try {
                        HttpRequest req = new HttpRequest(AndyConstants.ServiceType.REGISTER);
                        response = req.prepare(HttpRequest.Method.POST).withData(map).sendAndReadString();
                    } catch (Exception e) {
                        response=e.getMessage();
                    }
                    return response;
                }
                protected void onPostExecute(String result) {
                    //do something with response
                    Log.d("newwwss", result);
                    onTaskCompleted(result, RegTask);
                }
            }.execute();
        }
    
        private void onTaskCompleted(String response,int task) {
            Log.d("responsejson", response.toString());
            AndyUtils.removeSimpleProgressDialog();  //will remove progress dialog
            switch (task) {
                case RegTask:
    
                    if (parseContent.isSuccess(response)) {
    
                        parseContent.saveInfo(response);
                        Toast.makeText(RegActivity.this, "Registered Successfully!", Toast.LENGTH_SHORT).show();
                        Intent intent = new Intent(RegActivity.this,MainActivity.class);
                        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
                        startActivity(intent);
                        this.finish();
    
                    }else {
                        Toast.makeText(RegActivity.this, parseContent.getErrorMessage(response), Toast.LENGTH_SHORT).show();
                    }
            }
        }
    }

Please tell me what is wrong here? i don't find anything.