There are many differences between Android studio and Eclipseadt, and here are some of the features that Android studio has compared to eclipse.
Colors, pictures can be previewed in real time in layout and code
String can be previewed in real time
Multi-screen preview, with device frame, can record simulator video at any time
You can open the file location directly
Move, search, jump across projects
Auto Save, no need to keep Ctrl + S
Rollback of n History even if file is closed
Intelligent reconstruction and intelligent prediction Error
Each line of file editing history, traceable to people
Various plugins such as ADB,. Gitignore, SQL, Markdown,
The picture can be turned directly. 9 pictures and comes with. 9 Edit
Using AAR at Gradle compilation is super convenient
This section mainly demonstrates the quick development techniques of Android Studio.
If you create a new project named MyApp, the default module name is app.
New Project
Name the project
Configuring Target Devices
Select Activity Template
Name the activity
Layout file is: Activity_empty.xml
<?xml version= "1.0" encoding= "Utf-8"?><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" Android:paddingbottom="@dimen/activity_vertical_margin" Android:paddingleft="@dimen/activity_horizontal_margin" Android:paddingright="@dimen/activity_horizontal_margin" Android:paddingtop="@dimen/activity_vertical_margin" Tools:context="Com.hitsz.xiaokai.myapp.EmptyActivity"> <TextViewandroid:layout_width="Wrap_content"android:layout_height= "Wrap_content" Android:text="Hello world!" /> </relativelayout>
The automatically generated emptyactivity content is as follows:
package com.hitsz.xiaokai.myapp;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;publicclass EmptyActivity extends AppCompatActivity { @Override protectedvoidonCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_empty); }}
A total of 8 views in Project menu bar, switch to Project view, find Androidmanifest.xml.
<?xml version= "1.0" encoding= "Utf-8"?><manifest package = "Com.hitsz.xiaokai.myapp"xmlns:android="http:/ /schemas.android.com/apk/res/android "> <applicationandroid:allowbackup="true"android:icon="@mipmap/ic_ Launcher "android:label=" @string/app_name "android:supportsrtl=" true " android:theme="@style/apptheme"> <activity android:name=". Emptyactivity "> <intent-filter> <action android:name="Android.intent.action.MAIN"/> <category android:name="Android.intent.category.LAUNCHER"/> </intent-filter> </activity> </Application></manifest>
You can also see that Build.gradle,gradle is a project automation building tool based on the Apache Ant and Apache maven concepts. It uses a particular domain-specific language (DSL) based on groovy to declare the project settings, discarding the tedious configuration of XML-based. Generally we configure the version information, the dependencies are configured in Build.gradle, and the declaration configuration for the four components is in Androidmanifest.xml.
And the Libs folder is a third-party frame library, and build is the file where the compilation is generated.
Android Studio also has a handy debugging tool,
Interrupt Point debugging,
Simulator debugging process,
Thread State,
Here we show theme Editor open mode,
The Android navigation Editor allows you to view information such as the activity's layout file, fragment, and class name.
Learn the Activity1 of Android Studio development tools