Android 常用依赖
依赖: //1百分比布局 implementation 'com.zhy:percent-support-extends:1.1.1' //2可折叠TextView implementation 'com.ms-square:expandableTextView:0.1.4' //3注解//插件依赖 3.0 改为8.4.0 implementation 'com.jakewharton:butterknife:8.6.0' annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0' //4glide加载图片 implementation 'com.github.bumptech.glide:glide:3.7.0' //5看有没有支持V4包的 implementation 'com.android.support:support-v4:25.0.0' //6glide图片处理依赖//glide的特效库 implementation 'jp.wasabeef:glide-transformations:2.0.0' //implementation 'jp.wasabeef:glide-transformations:3.7.0' //glide If you want to use the GPU Filters implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1' //7picasso图片处理依赖 picasso的特效库 implementation 'com.squareup.picasso:picasso:2.5.2' implementation 'jp.wasabeef:picasso-transformations:2.1.2' //picasso GPU Filters implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1' //8网络请求 implementation 'com.zhy:okhttputils:2.0.0' implementation 'com.squareup.okhttp:okhttp:2.4.0' implementation 'com.squareup.okio:okio:1.5.0' //9数据解析 implementation 'com.alibaba:fastjson:1.2.17' implementation 'com.android.support:recyclerview-v7:25.2.0' implementation 'com.google.code.gson:gson:2.8.1' //10下拉刷新上拉加载(如果是报错就改下版本号改为1.0.3) implementation 'com.lcodecorex:tkrefreshlayout:1.0.7' //11图片选择器 implementation 'cn.finalteam:galleryfinal:1.4.8.7' implementation 'cn.finalteam.rxgalleryfinal:library:1.0.9' //12图片压缩 implementation 'top.zibin:Luban:1.0.9' //13联动 implementation 'com.contrarywind:Android-PickerView:3.2.5' //implementation 'com.contrarywind:Android-PickerView:3.x' //注:实际引入请把"3.x"替换成具体版本号,最新版本号请以GitHub上面提供的为准 //14轮播图 implementation 'com.bigkoo:convenientbanner:2.0.5' implementation 'com.jude:rollviewpager:1.4.6' //15xbanner比Banner效果多 implementation 'com.xhb:xbanner:1.3.0' implementation 'com.xhb:xbanner:1.2.2' implementation 'com.nineoldandroids:library:2.4.0' //16eventbus implementation 'org.greenrobot:eventbus:3.0.0' //17第三方时间地区选择器 implementation 'com.contrarywind:Android-PickerView:3.2.5' //18流式布局 implementation 'com.github.alidili:FlowLayout:v1.1' //19权限申请 implementation 'pub.devrel:easypermissions:0.2.1' //20Recyclerview implementation 'com.android.support:recyclerview-v7:25.0.0' //21BottomNavigationBar底部栏(导航栏) implementation 'com.android.support:design:25.0.0' //22viewpager小圆点 implementation 'me.relex:circleindicator:1.2.2@aar' //23ViewPagerIndicator implementation 'com.shizhefei:ViewPagerIndicator:1.1.6' //24TabLayout implementation 'com.android.support:design:25.2.0' //25Retrofit依赖 // Okhttp库 // 支持返回Gson //支持返回字符串 implementation 'com.squareup.retrofit2:retrofit:2.0.2' implementation 'com.squareup.okhttp3:okhttp:3.1.2' implementation 'com.squareup.retrofit2:converter-gson:2.0.0-beta4' implementation 'com.squareup.retrofit2:converter-scalars:2.0.0' //26cardview CardView是在安卓5.0提出的卡片式控件 implementation 'com.android.support:cardview-v7:25.2.1' //27例如:Android6.0动态权限管理、网络请求、文件上传下载、图片选择、应用检查更新等等... implementation 'com.github.qxq.library:qxqsdk:1.0.1' //28底部导航栏 implementation 'am.widget:gradienttabstrip:27.0.2 //29扫描二维码 implementation 'cn.yipianfengye.android:zxing-library:2.2' //30强大的工具类 RXTools implementation 'com.github.vondear:RxTools:v1.7.6.4' //31各种样式的弹出窗 (博客地址:https://juejin.im/user/57c900182e958a0068ccc5f2) implementation 'com.timmy.tdialog:tdialog:1.3.1' //32流程步骤指示器 stepview implementation 'com.xyz.step:step:1.0.4' //33卫星菜单(类似桌面小圆圈) implementation 'csy.menu.satellitemenulib:SatelliteMenu:1.0.3' //34顶上去 implementation "de.halfbit:pinned-section-listview:1.0.0" //35炫酷的滑动卡片(在项目根目录 build.gradle文件中加入:maven { url "https://jitpack.io" }) implementation 'com.github.HalfStackDeveloper:SwipeCardRecyclerView:v1.0.1' //36SliderLayout 是一款自定义的无限自动轮播滚动控件,可以实现类似于京东淘宝的广告轮播效果。 implementation 'com.liuting.sliderlayout:SliderLayout:1.0.1' //37动画库 implementation 'com.airbnb.android:lottie:2.5.0' //38刷卡布局效果-开源框架AndroidSwipeLayout使用解 implementation 'com.android.support:recyclerview-v7:21.0.0' implementation 'com.android.support:support-v4:20.+' implementation "com.daimajia.swipelayout:library:1.2.0@aar" //39功能强大的EditText 仿支付宝数字滚动的TextView 可展开收起的LinearLayout 轻量级底部导航栏 implementation 'com.github.chaychan:PowerfulViewLibrary:1.2.1' //40可用来显示功能介绍引导用户的类 implementation 'com.github.wooplr:Spotlight:1.2.3' //41智能下拉刷新框架-SmartRefreshLayout(导一个依赖就行)(使用不同的类,刷新效果不同“水滴效果:WaveSwipeHeader;弹出圆圈:BezierCircleHeader...”) //1.1.0 API改动过大,老用户升级需谨慎 implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-1' implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-1'//没有使用特殊Header,可以不加这行 implementation 'com.android.support:appcompat-v7:25.3.1'//版本随意(必须) //1.0.4 当1.1.0出现问题可以回退到1.0.4-7 implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.4-7' implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.4-7'//没有使用特殊Header,可以不加这行 implementation 'com.android.support:appcompat-v7:25.3.1'//版本随意(必须) implementation 'com.android.support:design:25.3.1'//版本随意(非必须,引用可以解决无法预览问题) //42检测内存泄漏的常见工具-LeakCanary debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' // 43轻量级底部导航栏(建议使用最新版本) implementation 'com.github.chaychan:BottomBarLayout:1.0.8' //44仿手机支付宝支付数字密码输入验证,文字信息输入验证 implementation 'com.xw.repo:fillblankview:2.0@aar' //45万能的公告栏轮播 View,也可用于商品个性垂直轮播展示 implementation 'me.bakumon:bulletinview:1.0.0' //46这是一个基于AlertDialog和Dialog这两个类封装的多种弹出框样式 implementation 'com.dou361.dialogui:jjdxm-dialogui:x.x.x' //历史版本: implementation 'com.dou361.dialogui:jjdxm-dialogui:1.0.3' implementation 'com.dou361.dialogui:jjdxm-dialogui:1.0.2' implementation 'com.dou361.dialogui:jjdxm-dialogui:1.0.1' implementation 'com.dou361.dialogui:jjdxm-dialogui:1.0.0' //47识别身份证头像面,身份证国徽面,银行卡,行驶证,驾驶证 implementation 'com.github.eric0liang:lib_cardocr:1.0.4' //48京东 Android 客户端样式的级联地址选择器 implementation 'com.github.chihane:JDAddressSelector:1.1.4' //49 汉字转拼音 implementation 'com.github.promeg:tinypinyin:2.0.3' //50 万能的Adapter(与RecyclerView配合使用) implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30' //51 强大的播放器(https://github.com/google/ExoPlayer/releases版本及地址) implementation 'com.google.android.exoplayer:exoplayer:2.8.1' implementation 'com.google.android.exoplayer:exoplayer-dash:2.8.1' implementation 'com.google.android.exoplayer:exoplayer-ui:2.8.1' //52 实现双击缩放、平移缩放 photodraweeview(搭配使用) implementation 'com.facebook.fresco:fresco:1.3.0' implementation 'me.relex:photodraweeview:1.1.3' //53 屏幕适配(https://github.com/JessYanCoding/AndroidAutoSize今日头条屏幕适配) implementation 'me.jessyan:autosize:0.9.1' //53 万能的JC播放器(https://github.com/yangguangfu520/MobilePlayer1020在里面找) implementation 'fm.jiecao:jiecaovideoplayer:5.5' //54 优雅的加载Loading框架 implementation 'com.kingja.loadsir:loadsir:1.3.6' //55Android 内存泄漏分析利器——leakcanary debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3' //56工具类 https://blog.csdn.net/abcwang1234/article/details/53421290 implementation 'com.blankj:utilcode:1.3.4' //57一个强大的Android图表视图/图形视图库,支持线状 - 柱状,饼状,气泡图和K线图,支持缩放,拖动和动画。 implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3' //58 AppIntro 是一个让人轻松快速搭建漂亮酷炫的引导页库 implementation 'com.github.paolorotolo:appintro:v5.1.0' //59 app更新依赖 implementation 'com.qianwen:update-app:3.5.2' //60 替换LinLayout implementation 'com.google.android:flexbox:1.1.0'
检查错误:
gradlew compileDebugSource --stacktrace -info 在AndroidStudio的terminal中输入上面的命令,重新编译查看gradle的具体报错信息 运行如上命令后: gradlew compileDebugSources 提示错误信息 问题总结: 错误1: Android studio 3.0.1 版本gradle.properties根目录添加 解决: android.enableAapt2=false 错误2: Error:Plugin with id 'com.android.application' not found. Consult IDE log for more details (Help | Show Log) 解决: 总配置文件内是否有启动窗口