20175316 盛茂淞 2018-2019-2 《Java程序设计》实验四 《Android程序设计》 实验报告

实验四 Android程序设计

实验要求

  • 参考Android开发简易教程
  • 完成云班课中的检查点,也可以先完成实验报告,直接提交。注意不能只有截图,要有知识点,原理,遇到的问题和解决过程等说明。实验报告中一个检查点要有多张截图。
  • 发表实验报告博客,标题“学期(如2018-2019-2) 学号(如20175300) 实验四《Android开发基础》实验报告”

实验内容

下载安装Android Studio

  • 配置Proxy,第一次启动会要求安装Proxy,按步骤走
  • Android SDK location部分填的是新项目的存放地
  • JDK location须填JDK的绝对路径

新建项目

  • 项目模板选Empty Activity
  • 项目名填自己命名
  • Package name直接保持自动生成的名字就好
  • Language选择Java
  • Minimum API level按老师的博客来就好

配置和启动模拟器

项目的编译和运行

Android程序设计-1

实验内容与要求

Android Stuidio的安装测试: 参考《Java和Android开发学习指南(第二版)(EPUBIT,Java for Android 2nd)》第二十四章:

  • 参考http://www.cnblogs.com/rocedu/p/6371315.html#SECANDROID,安装 Android Stuidio
  • 完成Hello World, 要求修改res目录中的内容,Hello World后要显示自己的学号,自己学号前后一名同学的学号,提交代码运行截图和码云Git链接,截图没有学号要扣分
  • 学习Android Stuidio调试应用程序

实验代码

activity_main-xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="80dp"
        android:layout_marginRight="80dp"
        android:text="Hello World!\n20175315\n20175316\n20175317\n"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="Hello World!\n20175315\n20175316\n20175317\n" />
</android.support.constraint.ConstraintLayout>

运行截图

猜你喜欢

转载自www.cnblogs.com/sms369/p/10879009.html