In fact, I have been using Android for almost 3 months so far, and I still encounter the situation of flashback, but these are trivial and easy to solve.
1. Check whether your Activity is registered in AndroidManifest.xml .
If my Register.xml crashes (can't enter this page), see if there is any in AndroidManifest.xml
<activity
android:name=".RegisterActivity"
android:label="RegisterActivity" >
</activity>
2. If you have already registered, try the following method
Add in activity_register.xml: tools:context="com.xiaoxiaoyu.test.RegisterActivity
which is:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.xiaoxiaoyu.test.RegisterActivity" >
</RelativeLayout>
At present, as for these two situations, I will come back and add them when I encounter them later.