Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Using Android Studio integrated development environment to build Android     - Lua and C ++ (Programming)

- Installation and Configuration JDK8 In CentOS 7 (Linux)

- SaltStack installation and testing (Server)

- Linux Firewall Basics (Linux)

- Oracle Database Performance Optimization of memory disk (Database)

- Use smem visual display Linux memory usage (Linux)

- Ubuntu Froxlor Server Administration panel installation (Server)

- Common DDOS attacks (Linux)

- Ubuntu 14.04 How to install Cinnamon 2.4.5 (Linux)

- Spacewalk Linux system configuration and installation (Linux)

- MongoDB in bulk timestamp change the date format (Database)

- Let Mac OS X dedicated high-speed mobile hard disk can also be read in Linux (Linux)

- C ++ 11 smart pointers (Programming)

- Using FTPClient to upload and download files in Java (Programming)

- Ubuntu 14.04 install PostgreSQL 9.2 (Database)

- Python, and / or (Programming)

- How nodeclub constructed Docker image (Server)

- ORA-12154 TNS could not resolve the specified identifier (Database)

- Ubuntu manually set the DSL broadband connection (Linux)

- Linux Shell introduces (Linux)

 
         
  Using Android Studio integrated development environment to build Android
     
  Add Date : 2018-11-21      
         
         
         
  Before we talked about the use of IntelliJ IDEA 13 integrated development environment to build Android graphic tutorials. Yesterday, reinstall the system, so in order to keep up with the times, today, to try to use Android Studio. Before I read several articles that describe how to use the Android SDK integrated development environment to build Android, but the feeling is not detailed, so intend to organize a detailed graphic tutorials, hoping to novice (including their own) help.

[Development Environment]

Physical machine version: Win 7 Ultimate (64-bit)

Java SDK Version: jdk1.8.0_20 (64-bit)

Android SDK Version: Android 4.4 (API 20)

Android Studio Version: Android Studio Beta v0.8.6

 NOTE: The physical version and Java SDK version must be consistent, that is: the same as the same as the 64-bit or 32-bit.

A, Android Studio introduction:

2013 GoogleI / O the General Assembly for the first time released the Android Studio IDE (Android platform Integrated Development Environment). It is based on Intellij IDEA development environment, designed to replace Eclipse and ADT (Android Development Tools) to provide better tools for developers. Since Google has been trying to promote, I believe the near future is expected to catch up with Eclipse.

Compared to Eclipse, Android Studio IDE has its own characteristics:
UI interface design to code and have better support for multiple resolutions can be easily adjusted on the device.
Also supports ProGuard tools and applications signatures.
However, the current version of Android Studio can manage multiple projects in the same window. Each project will open a new window. I guess this is borrowed Intellij IDEA behavior, and Google recently not this make adjustments.
Support Gradle build automation tool, and it was excellent, but just transferred from the Eclipse platform developers still need some time to learn and adapt.
 

Second, the software is ready:

As to the development of Android, no matter what development environment, Java SDK and Android SDK are essential (Android SDK already integrated in Android Studio good). After downloading my theme packages as follows:



1, Java SDK installation:

Download site: http: //www.oracle.com/index.html

Since my operating system is 64-bit, so I downloaded the 64-bit version of the JDK:

Once downloaded, start the installation:

Select the installation path according to their preferences.

Behind the need to configure the environment variables, specifically refer to my other blog post: Java configuration ---- JDK development environment to build and configure the environment variables

2, Android Studio download and installation:

Download site: http: //developer.android.com/index.html

Part of the text, enter another link:

The red frame part, pop up the following interface:

Red frame section to start the download:

After the download is complete, you can begin the installation:

Select the appropriate installation path, and then continued:

After installing the software, Android SDK will automatically appear in the installation directory:

Third, start running the software:

Note: After Before we installed and properly configured JDK environment variable, once run Android Studio, it will automatically load the JDK (provided that the correct configuration environment variable), and the Android SDK has been. Now it began to run the software.

After the installation is complete Android Studio, start running the software, the first time it is run, the following dialog box.

It is to remind you that a previous version of Android Studio settings file that was previously used Android Studio users accustomed to the operation of a xml file generated can be used directly after the import previously developed the habit, and for new users, the basic I do not need to select that item on the list.

Then we click on the Create New Project, create a new project.

NOTE: Android Studio in the Project, not a real project, it is actually with the eclipse of the workspace, visual studio the solution is a concept.

Here we look at this table know:

 eclipse IEDA / Android Studio
Workspace workspace project
Project project module
References preference module dependency
After following interface pops up:

We play a good project name, and in the right path, and then click "Next", following interface pops up:

Choose the smallest version of the API (this according to individual needs). Then continues:

Select a template style. Then continues:

After the establishment of project completion, the software will automatically download and gradle related components, time-consuming longer (because it is first loaded):

Wait a moment when we will be able to see the project completed:

Note that a close look at the directory structure of the project file, and the library loads (including the Android SDK and Java SDK).

Click on the menu bar "File Project Structure", we check before loading the SDK:

Java SDK and Android SDK is fully loaded, it is the result we want. The figure above, click on the "Project" tab, you can view gradle versions:

Fourth, the installation Genymotion Simulator:

1, Genymotion installation:

Genymotion is undoubtedly the fastest and best use of the simulator. Download the official website address: http: //www.genymotion.net/

To register, download and install VirtualBox is the easiest way to download a VirtualBox package of Genymotion

start installation. Genymotion then run the software, it will prompt you to create a virtual device, click on the yes button to start creating a virtual device.

Connect using a previously registered account.

Then select one version of the simulator.

2, the simulator Genymotion and Android Studio is associated with.

First Genymotion's official website to download plug-ins.

Then, open Android Studio, select the menu bar "File --- settings", the following screen appears, and select Plugins.

Choose "Install plugin from disk", from the local loading plug-ins, pop up the following interface:

Downloaded widget to load before selecting us. Thus, we can see more of a plug-in plug-Genymotion list:

Then restart the software so that the new load plug into force. After the restart the software Android Studio, select the menu bar "View - Toolbar", so that the toolbar is displayed, you can see more than a toolbar icon Genymotion Device Manager:

Click on this icon to display the following interface:

Loading Before we installed Genymotion folder. Then click on the icon to display the following interface:

You can see that we have before you start up the simulator:

It's done.

Of course, if you want to run a program on the simulator, but also to ensure that the simulator is loaded Android SDK:

Then, run the program on the simulator:

Compiled version is API 20, but the simulator version is API 16, but the program still can run, indicating that Android Studio on version compatibility issues do well. However, before using IntelliJ IDEA, we must ask the compiler versions and simulators (real machine) version to be consistent.

Five, Android Studio's simple setup:

Topic Review:

One may think that the software interface does not look good, we can change about the topic. Select the menu bar "File - settings - apperance - theme", theme Choose Darcula:

Code Font Review:

Select the menu bar "File - settings - Editor - Colors & Fonts - Font":

The Scheme is not possible to change the default, click the "Save As", the establishment of a new name (for example MyFont):

You can choose the font we want.

You can also modify the console font.
     
         
         
         
  More:      
 
- ORA-00845: MEMORY_TARGET not supported on this system Problem (Database)
- Ubuntu 14.04 CodeBlocks configuration manually compile Boost 1.57.0 (Linux)
- Using 30 seconds to write a detailed analysis of garbage removal system (Linux)
- How do you temporarily emptied Bash environment variable before running the command on Linux (Linux)
- Mac OS X 10.9 compiler OCI8 module (Programming)
- Linux security concerns again (Linux)
- Android custom controls create the simplest skid menu in the history (Programming)
- Android code performance optimization tips (Programming)
- STL source code analysis - iterator each container classification (Programming)
- iOS Sensor Development - add to APP phone password, fingerprint security authentication (Programming)
- Basic Java JNI (Programming)
- Java Builder mode (Programming)
- How to implement large-scale distributed Yahoo depth study on the Hadoop cluster (Server)
- Spark SQL job of a lifetime (Server)
- php performance monitoring module XHProf (Linux)
- ActiveMQ configuration Getting Started Tutorial (Server)
- Nine artifact control disk partition under Linux (Linux)
- Use value type build better applications Swift (Programming)
- Java executable file to read information from a database copy (Programming)
- Docker - for the development and deployment of unified lightweight Linux containers (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.