first create a
How to manually create a project in AS
Manually create events
Manually create an activity
new and an empty activity.
Do not select these two first and then manually adjust them.
The first option is to directly bind a layout.
The second option is to set the currently set activity as the home page
Manually create layouts
Load this layout in activity
Add the following code in the onCreate() method
setContentView(R.layout.activity_main);
Register in the AndroidManifest file
Open the AndroidManifest
<activity android:name=".FirstActivity"></activity>
Register with the activity tag In general, the AS will automatically register
Register main event
<activity android:name=".MainActivity">
<intent-filter>
<actionandroid:name="android.intent.action.MAIN"/>
<categoryandroid:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
Add the intent-filter tag and two lines of code to the activity tag