所花时间(包括上课):4h
代码量(行):70
了解到的知识点:Android Studio的安装使用,Genymotion虚拟机的安装使用,github 和git
今天的时间除了看教程,主要的时间花在了Android Studio Genymotion git 这些东西的安装配置了(感觉时间有点浪费?这些东西其实早就应该弄好的)
今天晚上这几个小时我一直在看安卓入门的教程。现在才开始学习安卓,今天知识点太多难以一下吸收,还是要慢慢来。
首先我决定这两个星期完成一个简单的实现连接数据库并能够添加数据的安卓程序。
出于时间和效率等因素的考量,界面设计知识点多但杂,但是却实际上比较简单易学,我决定先把与连接数据库核心搞明白,这些知识点先浏览一下,到时候用到在查。
我先熟悉了安卓一般XML的写法,下面是来自教程的一段代码,很简单
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I am a TextView" />
<Button android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I am a Button" />
</LinearLayout>
熟悉下文本框的写法,这段代码也来自教程
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:gravity="center"
android:background="#8fffad">
<TextView
android:id="@+id/txtOne"
android:layout_width="200dp"
android:layout_height="200dp"
android:gravity="center"
android:text="TextView(显示框)"
android:textColor="#EA5246"
android:textStyle="bold|italic"
android:background="#000000"
android:textSize="18sp" />
</RelativeLayout>
android studio还需要安装一些插件等问题,我就不把东西全写在一篇博客里了。。。
今天先安装一个Genymotion虚拟机,日后用起来更加方便
首先去官网下载:点第二个有vbox的版本
然后是简单的安装步骤
注册并登录进入主页面
新建一个虚拟设备
等待安装完毕
如果出现报错打不开的问题参见这篇文章:https://blog.csdn.net/qq_43967413/article/details/122353644
我最终成功打开了






浙公网安备 33010602011771号