Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mdad:laboratoare:02 [2020/11/04 21:10]
alexandru.radovici
mdad:laboratoare:02 [2020/11/04 21:21] (current)
ioana_maria.culic
Line 2: Line 2:
 ==== Objectives ==== ==== Objectives ====
   * Install and use the Android Studio IDE.   * Install and use the Android Studio IDE.
-  * Use the development process for building Android apps. 
   * Create a simple ''​Hello World''​ Android project.   * Create a simple ''​Hello World''​ Android project.
-==== Installing ​Android Studio ==== +==== Install ​Android Studio ==== 
-Android Studio provides a complete ​integrated development environment (IDE) including an advanced code editor and a set of app templates. In addition, it contains tools for development,​ debugging, testing, and performance ​that make it faster and easier ​to develop apps. You can test your apps with a large range of preconfigured ​emulators or on your own mobile device, build production apps, and publish on the Google Play store.+Android Studio provides a complex ​integrated development environment (IDE) including an advanced code editor and a set of application ​templates. In addition, it contains tools for development,​ debugging, testing, and performance ​evaluations,​ which enable a faster and easier ​application development process. You can test your apps with a large range of pre-configured ​emulatorsor on your own mobile device, build production apps, and publish ​them on the Google Play store.
  
-Android Studio is available for computers running ​Windows ​or Linux, and for Macs running macOS. The newest OpenJDK (Java Development Kit) is bundled with Android Studio.+Android Studio is available for WindowsLinux, and MacOS. The newest OpenJDK (Java Development Kit) is bundled with Android Studio.
  
 To get up and running with Android Studio, first check the [[https://​developer.android.com/​studio/#​Requirements|system requirements]] to ensure that your system meets them. The installation is similar for all platforms. Any differences are noted below. To get up and running with Android Studio, first check the [[https://​developer.android.com/​studio/#​Requirements|system requirements]] to ensure that your system meets them. The installation is similar for all platforms. Any differences are noted below.
  
-=== Steps for installation ​=== +=== Installation process ​=== 
-  - Navigate to the [[https://​developer.android.com/​studio/​|Android developers site]] and follow the instructions to download and [[https://​developer.android.com/​studio/​install|install Android Studio]].+  - Navigate to the [[https://​developer.android.com/​studio/​|Android developers site]] and follow the instructions ​necessary ​to download and [[https://​developer.android.com/​studio/​install|install Android Studio]].
   - Accept the default configurations for all steps, and ensure that all components are selected for installation.   - Accept the default configurations for all steps, and ensure that all components are selected for installation.
-  - After finishing ​the install, the Setup Wizard will download and install some additional components including the Android SDK. Be patient, this might take some time depending on your Internet speed, and some of the steps may seem redundant.+  - After completing ​the install ​process, the Setup Wizard will download and install some additional components including the Android SDK. Be patient, this might take some time depending on your Internet speed, and some of the steps may seem redundant.
   - When the download completes, Android Studio will start, and you are ready to create your first project.   - When the download completes, Android Studio will start, and you are ready to create your first project.
 === Installation videos === === Installation videos ===
Line 36: Line 35:
 You may also see a "Tip of the day" message with keyboard shortcuts and other useful tips. Click Close to close the message. You may also see a "Tip of the day" message with keyboard shortcuts and other useful tips. Click Close to close the message.
  
-If you made all the previous steps correctly, you should see something like this: +If you completed ​all the previous steps correctly, you should see something like this: 
 {{:​dapm:​laboratoare:​lab01_project_opened.png?​500|500}} {{:​dapm:​laboratoare:​lab01_project_opened.png?​500|500}}
 ====Use a virtual device (emulator)==== ====Use a virtual device (emulator)====
Line 45: Line 44:
 In order to run an emulator on your computer, you have to create a configuration that describes the virtual device. In order to run an emulator on your computer, you have to create a configuration that describes the virtual device.
  
-  - In Android Studio, select **Tools** > **AVD Manager**. Your Virtual Devices screen ​appears. If you've already created virtual devices, the screen ​shows them (as shown in the figure below); otherwise you see a blank list.{{:​dapm:​laboratoare:​lab01_avd_manager.png?​400|400 }} +  - In Android Studio, select **Tools** > **AVD Manager** ​and a Virtual Devices screen ​will appear. If you've already created virtual devices, the screen ​will display ​them (as shown in the figure below); otherwise you will see a blank list.{{:​dapm:​laboratoare:​lab01_avd_manager.png?​400|400 }} 
-  - Click the **+Create Virtual Device**. The **Select Hardware** window ​appears showing ​a list of pre configured hardware devices. For each device, the table provides a column for its diagonal display size (**Size**), screen resolution in pixels (**Resolution**),​ and pixel density (**Density**).{{:​dapm:​laboratoare:​lab01_select_hardware.png?​400|400 }} +  - Click the **+Create Virtual Device** ​and wait for the **Select Hardware** window ​to show up. This will display ​a list of pre-configured hardware devices. For each device, the table provides a column for its diagonal display size (**Size**), screen resolution in pixels (**Resolution**),​ and pixel density (**Density**).{{:​dapm:​laboratoare:​lab01_select_hardware.png?​400|400 }} 
-  - Choose a device such as **Nexus 5x** or **Pixel XL**, and click **Next**. The **System Image** screen ​appears+  - Choose a device such as **Nexus 5x** or **Pixel XL**, and click **Next**. The **System Image** screen ​will show up
-  - Click the **Recommended** tab if it is not already selected, and choose which version of the Android system to run on the virtual device (such as **Oreo**).{{:​dapm:​laboratoare:​lab01_emulator_system_image.png?​400|400 }} +  - Click the **Recommended** tabif it is not already selected, and choose which version of the Android system to run on the virtual device (such as **Oreo**).{{:​dapm:​laboratoare:​lab01_emulator_system_image.png?​400|400 }} 
-  - After choosing a system image, click **Next**. The **Android Virtual Device** (AVD) window ​appears. You can also change the name of the AVD. Check your configuration and click **Finish**.+  - After choosing a system image, click **Next** ​and the **Android Virtual Device** (AVD) window ​will appear. You can also change the name of the AVD. Check your configuration and click **Finish**.
 === Run the app on the virtual device === === Run the app on the virtual device ===
 Now we will run the Hello World app Now we will run the Hello World app
Line 55: Line 54:
   - The **Select Deployment Target** window, under **Available Virtual Devices**, select the virtual device, which you just created, and click **OK**{{:​dapm:​laboratoare:​lab01_select_deployment_target.png?​400|400 }}   - The **Select Deployment Target** window, under **Available Virtual Devices**, select the virtual device, which you just created, and click **OK**{{:​dapm:​laboratoare:​lab01_select_deployment_target.png?​400|400 }}
  
-The emulator starts and boots just like a physical device. Depending on the speed of your computer, this may take a while. Your app builds, and once the emulator is ready, Android Studio will upload the app to the emulator and run it.+The emulator starts and boots just like a physical device. Depending on the speed of your computer, this may take a while. Your app will start building, and once the emulator is ready, Android Studio will upload the app to the emulator and run it.
  
 You should see the Hello World app as shown in the following figure. You should see the Hello World app as shown in the following figure.
 {{:​dapm:​laboratoare:​lab01_app_running.png?​200|200}} {{:​dapm:​laboratoare:​lab01_app_running.png?​200|200}}
  
-**Tip**: When testing on a virtual device, it is good practice to start it up once, at the very beginning of your session. You should not close it until you are done testing your app, so that your app doesn'​t have to go through the device startup process again. To close the virtual device, click the **X** button at the top of the emulator, choose **Quit** from the menu, or press **Control-Q** in Windows or **Command-Q** in macOS.+**Tip**: When testing on a virtual device, it is good practice to launch ​it at the very beginning of your session ​and don'​t ​close it until you are done testing your app, so that the deployment ​doesn'​t have to go through the device startup process again. To close the virtual device, click the **X** button at the top of the emulator, choose **Quit** from the menu, or press **Control-Q** in Windows or **Command-Q** in macOS.
  
 ===Bonus=== ===Bonus===
-  - Make the app display ​your name instead of the Hello World message +  - Change ​the app so it displays ​your name instead of the Hello World message. 
-  - Run the app on a physical device instead of the emulator+  - Run the app on a physical device instead of the emulator.
mdad/laboratoare/02.1604517013.txt.gz · Last modified: 2020/11/04 21:10 by alexandru.radovici
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0