导入xUtils_3 工程到Android(安卓)Studio
16lz
2021-01-24
下载地址如下:
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了。
更多相关文章
- 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
- Windows cordova build Error: Could not find gradle wrapper w
- Android之JNI:Android(安卓)Studio使用Gradle编译C/C++源码
- Android获取APP的应用程序名称、包名、图标,版本号基本信息
- Android httpclient接收xml乱码问题解决方法
- WebView 无法执行js代码
- Android工程运行 ADB server didn't ACK * failed to start daem
- Android多渠道SDK开发心得(5)——多渠道sdk的调试
- Android之反编译APK文件,查看源代码