Android Some of the tools used in development.
Step 1. Dependent Manner
The First: Add the JitPack repository to your build file
(1) Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
(2) Add the dependency
dependencies {
...
compile 'com.github.Jusenr:androidtools:1.3.6'
}
The Second: Add the dependency
dependencies {
...
compile 'com.jusenr.android.library:androidtools:1.3.6'
}
Step 3. Add required permissions
<manifest
...
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<application
...
<!--Log view page-->
<activity
android:name="com.jusenr.toolslibrary.log.PTLogActivity"
android:screenOrientation="portrait"/>
</application>
</manifest>
Step 4. Initialization configuration
App extends Application{
@Override
public void onCreate() {
super.onCreate();
//AndroidTools initialise.
AndroidTools.init(getApplicationContext(), "LogTag");
}
}
Thanks to Guchenkai, Trinea, Riven_chris, Zengshengwen, Leo, Sunnybear, Liuwan, Wangxiaopeng, Orhanobut provides the resources.
- Support packet conflict problem
Add Build.gradle to the project: The version is the current version of your project.
subprojects {
configurations.all {
resolutionStrategy {
force 'com.android.support:support-xx:xx.x.x'
}
}
}