I'm trying to change the first Activity
of my app and I believe I would just have to change in the Manifest
under the Activity tag.
Right now I'm trying to change it to Main2Activity.
<activity android:name=".Main2Activity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
When I run this I get the error Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed with multiple errors, see logs
I'm unsure how to go about fixing this. It works fine if I leave it as MainActivity though.
Class I'm trying to add
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
}
public void multiplayerView(View view) {
startActivity(new Intent(this, MainActivity.class));
}
public void campaignView(View view) {
startActivity(new Intent(this, MainActivity.class));
}
}