In fact, is not the first, has been written in accordance with a few books, but the wood has written the blog, or the first one.
Platform: Android Studio version 3.0
100 years of constant "Hello, world".
Use of ADB
The direct installation here is Android Studio, and it is connected to the real machine debugging.
Engineering directory structure for Android Studio
The project configuration file generated by the. Idea://as, similar to Eclipse's project.properties.
App://as Create a module in the project.
gradle://the jar and wrapper of the build tool system, the jar tells the as how to build contact with the Gradle of the system installation.
Java://java code, including engineering and new is the default generated test engineering source Res://resource file, similar to eclipse. drawable: layout://app Layout and interface element configuration mipmap: values: colors.xml://profiles that define colors. strings.xml://defines the configuration file for the string. Styles.xml://Defines a style's configuration file. Manifests: Androidmanifest.xml://app basic information (Android Admin file, also entry file) Gradle Scripts
Res directory all resource files will be generated under the R.java file corresponding resource ID, we can directly through the resource ID access to the corresponding resources, the R file can be understood as a dictionary, each resource under res will be here to generate a unique id!
Three important documents
Mainactivity.java
Layout file: Activity_main.xml:
Configuration file Androidmanifest.xml:
The activity component that contains the filter in the Androidmanifest file is the default startup class that the system calls automatically when the program starts
< Intent-filter > < android:name= "Android.intent.action.MAIN"/> < android:name= "Android.intent.category.LAUNCHER"/></ Intent-filter >
Intent-filter indicates that the activity will be executed first when the program is opened.
First Android Program