XUtils3 environment construction and xutils3 Environment Construction

Source: Internet
Author: User

XUtils3 environment construction and xutils3 Environment Construction

XUtils3 Environment Construction

Environment Building Trilogy

-----------------------

Note:

Author Xiu Yuxuan Chen
You have created a project using andorid Studio.

And you need to use xutils 3.0.x

-----------------------

Part 1: Resource download

Download the latest version from github.

Https://github.com/wyouflf/xUtils3

Decompress the package

View the extracted content ,:

Add the xutils file to the project file. (note the directory structure of the file) add all the files to the project root directory. For example, my project is called "yixueyuan"

Step 2:

In the xutils directory, view the build. gradle file as follows:

Make the build. gradle version under xutils consistent with the version under the app directory, as shown below:

Add xutils to setting. gradle in the project, for example:

Finally, add the following in build. gradl:

Dependencies {
Classpath 'com. android. tools. build: gradle: 1.3.0'
Classpath 'com. jfrog. bintray. gradle: gradle-bintray-plugin: 8080'
Classpath 'com. github. dcendents: android-maven-gradle-plugin: 1.3'
// NOTE: Do not place your application dependencies here; they belong
// In the individual module build. gradle files
}

Example:

Sync Now Synchronization

After a long wait, you can use it.

Part 3: Use xutils

After the first two steps, the xutils environment has been configured. The following describes how to use xutils.

Create your own Application: and overwrite the OnCreate () method of the application,

@Override
public void onCreate()
{
     super.onCreate();
     x.Ext.init(this);// xutils init ...
}

Example:

Used in the application tag of AndroidManifest. xml

Android: name = <Application Path...>

Okay, okey ~~~

The environment has been set up ~~~~~~

 

Summary:

 

In fact, other class libraries can be added in this way.

 

Buy one get one: Next section describes how to use xutil3.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.