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.