# 20182333 2019-2020-1 "data structures and object-oriented programming" Experiment 5 report

20182333 2019-2020-1 "Data structures and object-oriented programming" Report of Experiments 5

Course: "Programming and Data Structures"

Class: 1823

Name: Jia Yu Qian

Student ID: 20182333

Experiment Teacher: Wang Zhiqiang

Experiment Date: October 14, 2019

Compulsory / Elective: Compulsory

1. Experimental content

1.Android Stuidio installation test:

  • Reference "Java and Android Development Study Guide (Second Edition) (EPUBIT, Java for Android 2nd)" Twenty-four chapters:
  • Referring http://www.cnblogs.com/rocedu/p/6371315.html#SECANDROID, installation Android Stuidio
  • Complete Hello World, to amend the contents res directory, the Hello World to show their student number, student number around himself a student of the school, submit the code run shot and cloud Git code links, screenshots no student number to the point
  • Learning Android Stuidio debug applications

2.Activity test

  • Reference "Java and Android Development Study Guide (Second Edition) (EPUBIT, Java for Android 2nd)" Twenty-five chapters:
  • Build the project, run materials relevant code
  • Creating ThirdActivity, show their student number in ThirdActivity, modify the code so that MainActivity start ThirdActivity

3.UI test

  • Reference "Java and Android Development Study Guide (Second Edition) (EPUBIT, Java for Android 2nd)" Twenty-six chapters:
  • Build the project, run materials relevant code
  • To show their student ID information to modify the code so that the message Toast

4. Test layout:

  • Reference "Java and Android Development Study Guide (Second Edition) (EPUBIT, Java for Android 2nd)" Chapter XXVII:
  • Build the project, run materials relevant code
  • Modify the layout make the interface with different materials P290 page

5. Test Event Processing:

  • Reference "Java and Android Development Study Guide (Second Edition) (EPUBIT, Java for Android 2nd)" Twenty-eight chapters:
  • Build the project, run materials relevant code
  • Submit code run shot and cloud Git code links, screenshots have a watermark student number, otherwise they will be penalized

2. Experimental procedure and results

1. Complete Hello World, to amend the contents res directory, the Hello World to show their student ID, a number of school students before and after their own student number

  • Screenshot operating results

2. Create ThirdActivity, show their student number in ThirdActivity, modify the code so that MainActivity start ThirdActivity

  • Screenshot operating results

To show their student ID information 3. Modify the code so that the message Toast

  • Screenshot operating results

4. Edit Layout

  • Screenshot operating results

5. Event Processing: build the project, run materials relevant code

  • Screenshot operating results

3. Experimental problems encountered in the process and settlement process

  • Question 1: The console appears Error running app: Default ActivityNot Found Tips
  • Problem 1 Solution: Because Android Studio When you create a project, the default setting Lunche project is needed Activity, as simple Widget program, and if not associated with an application, you do not need to create MainActivity in the Android project, after the Build Project, it will error when debugging installation.
    • Open Configuration app->Edit Configurations...
    • launchOptions drop-down selectionNothing
  • Question 2: error Element selector must be declared
  • Problem 2 Solution: This is because .xmlunder the wrong place to be, have to move back to the corresponding folder.
  • 问题3:报错the user data image is used by another emulator. aborting
  • Question 3 Solution: This is because the emulator is not properly closed, should be turned off in the process, and then restart.
  • Question 4: Can not resolve symbol error
  • Question 4 Solution: Click on menu File-> Invalidate Caches / Restartclick the dialog box Invalidate and Restart, clear cacheand restart.

Other (perception, thinking, etc.)

The experiment is a preliminary study using Android Studio of some of the above tests. But still a little difficult. And their computer a bit dated, run APP is too card, so I feel irritable.

Reference material

Guess you like

Origin www.cnblogs.com/qianjiayu/p/11723220.html