移动平台开发与实践第一次作业

No. 20169204 Week 1

Part One Instroduction

I have selected the course:<Mobile platform development and Practice>,then ,Mr.Lou will take us into the world of Android. This is a amazing world.Things that we should do still more and more.
First,although we have many choose,I believe it which Mr.Lou insisted that we use the Linux System.To some extent,it has many advantages that using Linux to mobile develop.This moment I am not going to continue this topic,Linux,the problem will be discussed in detail later. When choosing the Linux,we have a lot prepare works to do.Such as Configure Linux system,byside,install the software to help us write programs.
Second,when we have the right development environment,don't rush to develop programs. Code management is a problem worth considering! Here I want to thank Mr.Lou introduced many effective tools to us,which makes us work behind.This blog will introduce you to that tips. Both fo Open source code and the Blog Garden are the two themes of the course, also as to learn Android's essential tools.
At the last, as a student majoring in mathematics and applied mathematics, I am willing to learn this technique. I hope that through this way of learning,can master the Java,a  programming language,as well as good writing skills! There may be many errors in the use of words and grammer,are my personal responsibility,please forgive me. However,the practice of the back of the program must be through my practice,I hope this article can have little effect!    

Part Two Integrated platform and Environment configuration

1.Install the JDK on Linux

    After having learning the blog which belong to Mr.Lou, Intellj IDEA API Tutorial, I have successfully configured the JDK environment. This work's difficulty lies in the configuration environment variables,but it is not necessary to worry about it. Here are two ways to configure:                                     
  At first extract the jdk-8u 121-linux-x64.tar.gz(Visit www.java.com download) 

1.1 One method:Configuration environment variable

     a. Enter commond line:  gedit .bashrc


     b. Enter commond line:  source .bashrc   
        
     Up to now,the environment has been configured! We can check it:
        Enter commond line:  java

1.2 Two method:Configuration environment variable(Reference: SamZhang,Java environment variables configuration on Linux)

     This method is more safe and it can be used to control these environment variables permissions to the user level,if you need to give a user 
 permission to use these environment variables,you only need to modify the personal user home directory of the .Bash_profile file will be ok. 
     Enter commond line:   vi .bashrc 



At the end of the page added the following:
export JAVA _ HOME=~/jdk
export PATH= $ JAVA _ HOME/bin: $ PATH
export CLASSPATH=.😒 JAVA _ HOME/lib/dt.jar:$ JAVA _ HOME/lib/tools.jar
save it,then enter the commond: source .bashrc

2. Install git tools

    It is very necessary to configure git which a very useful tool. Its configuration is like this:
    After obtaining administrator privileges,enter commond line:    sudo apt-get install git
    According to tips, select 'Yes',or input 'y',


then,set youself infotmation,enter commond:
git config --global ywq.name "20169204GoldDog"
git config --global ywq.name "894572560@qq.com"
This is my first time to touch Java and Linux, so I can not say too much. Install git on Windows is easy,we can download 'git.exe',
According to the install program,crazy next step can be! Open the interface as shown below:

Part Three From the first Java program

I don't know to much about the Java which far less I know C/C++. So,I need to write the first program, HelloWorld! Review to my studing history about computer language,all from the HelloWorld. In this experiment, I use Myeclipse to help me. Mr.Lou advise us to using Linux,and the compiler vi. But I don't have a good grasp of this technique,Integrated development environment makes me more comfortable.


Run it get:

Although this is very simple,but for beginners,it is not easy for me and I am very excited!
Next,I would like to briefly introduce the first program in Linux. Command:
1. mkdir src
2. mkdir bin
3. vi src/Hello.java

Write the first Java program in this window:

// The first Java program, its funchtion is printed "Hello World!".
    public class Hello{
        pulic static void main(String[] args){
            System.out.println("Hello World!");
        }
    }
Save it,
4. javac Hello.java
generator a document: Hello.class

5. java Hello

Part Four Upload code to OSC(Open source code)

Have to say this question has baffled me, I have lost much times. But I am not lonely to fight! Thank God, I have three very clever and enthusiastic roommates whom proficient computer from three different university. Thus,I feel so luchy that I can finish my homework which not because of the past to learn mathematics as to a embarrassing situation. 
At first, access site:https://git.oschina.net. Sign in and go to the Mr.Lou's project.


Click new project,we have

Building a project is not a difficult task, in accordance with the requirements of the above interface. The next work was hard, and in fact, I failed 8 times.

Second, Open the 'Git Bash.exe', get into source directory and enter the following commond:
1. git init
2. git pull http:oschina.net/md2017/GoldDog.git
Here we should enter the account and password in OSC.


3. git touch README.md
4. git add .
5. git commit -m "ihao"
6. git remote add origin
7. git remote add origin http://git.oschina.net/md2017/GoldDog.git
8. git push -u origin master

posted on 2017-03-05 22:34  游伟青20169204  阅读(162)  评论(6编辑  收藏  举报