下载地址如下:

https://github.com/wyouflf/xUtils3/tree/master

㈠将下载的工程复制到Project目录下:

㈡添加到settings.gradle文件:

include ‘:app’,':xutils’

㈢编译到工程中

dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])    compile 'com.android.support:appcompat-v7:23.0.1'    compile project(':xutils')}

㈣将xutils文件夹下的build.gradle中的版本与最低版本调整到与创建工程一致

compileSdkVersion 23buildToolsVersion "23.0.1"defaultConfig {    minSdkVersion 15    targetSdkVersion 23    versionCode 20151224    versionName version}

㈤添加如下代码到build.gradle(Project:XutilsDemo)中

dependencies {    classpath 'com.android.tools.build:gradle:1.3.0'    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'    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}

其中红色标记为添加的代码。

点击Sync now就可以使用xUtils了。

更多相关文章

  1. 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
  2. Windows cordova build Error: Could not find gradle wrapper w
  3. Android之JNI:Android(安卓)Studio使用Gradle编译C/C++源码
  4. Android获取APP的应用程序名称、包名、图标,版本号基本信息
  5. Android httpclient接收xml乱码问题解决方法
  6. WebView 无法执行js代码
  7. Android工程运行 ADB server didn't ACK * failed to start daem
  8. Android多渠道SDK开发心得(5)——多渠道sdk的调试
  9. Android之反编译APK文件,查看源代码

随机推荐

  1. 在ubuntu9.10下build android(转)
  2. Android(安卓)给圆形头像加边框
  3. android greenDao 编译问题总结
  4. Android可控图片旋转
  5. Android(安卓)性能优化(六)——资源文件的
  6. Android(安卓)配置问题
  7. Android(安卓)判断网络连接情况
  8. Android(安卓)开发获取手机运行内存工具
  9. 开源项目Universal Image Loader for And
  10. android JNI tips