Use Genymotion simulator and genymotion Simulator
Use Genymotion Simulator
Genymotion is a complete set of tools that provide an Android virtual environment and are a good news for developers, testers, resellers, and even game players. Genymotion supports Windows, Linux, Mac OS, and other operating systems for easy installation and use.
1. Install Genymotion Simulator
1. Open www.genymotion.com to register an account
After registration, enter the registration email to activate your genymotion account.
2. Download genymotion (VirtualBox Version)
3. Install VirtualBox and genymotion
4. Download an image online (you must log on to the software first)
5. Genymotion ADB tool connection settings
6. Select the downloaded image and click Start to Start the simulator.
Note: When you install VirtualBox, ensure that the user name does not contain non-ASCII code.
2. Create an Android Application
1. Create the android project HelloAndroid]
Enter the project name, select the SDK version, and enter the package name ......
2. Project Structure
3. layout configuration file activity_main.xml
4. String configuration file strings. xml
HelloAndroid
Settings
Hello Android!
5. Main Interface MainActivity
Package net. hw. hello_android; import android. app. activity; import android. OS. bundle; public class MainActivity extends Activity {@ Override protected void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); // use the layout resource file to set the user interface setContentView (R. layout. activity_main );}}
6. Start the Genymotion simulator and view the running effect.
How can I modify the displayed content? In this case, you need to understand the android project structure and the file in which the data exists.
Iii. Android project structure
1,Src(Source) Stores Java source code (control layer)
2,Gen(Generated) files automatically generated by the system, which cannot be modified.
3,Bin(Binary) files generated after compilation, including apk files
4,Res (resource)Resource folder
(1) drawable: Stores image resources.
(2) layout: stores layout resource files.
Generally, each window corresponds to a layout resource file.
(3) values: stores data resources.
The strings. xml file defines several key-value pairs:
Modify the "value" in the blue box, and then run the program to see the effect.
Of course, the Genymotion simulator can also be used in combination with the Android Studio development environment.