方法1:在AndroidManifest.xml修改默认启动页面
添加相关代码即可
<activity
android:name=".PersonalInformation"//导入的.java页面
android:exported="true">//确认导入这个页面
<intent-filter>//这一整段intent-filter代表把这个.java的页面作为主页面
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
把intent-filter剪切到你想要作为主页面的页面即可。
方法二:右键.java文件,运行即可。
方法三:在使用方法二运行过后,直接修改启动选项即可。
app是启动默认界面,其他的是启动指定页面,有叉的是启动失败的界面。右侧的Nexus 4 API 22是启动的模拟器版本,也可以根据需求修改。