1. 程式人生 > >android studio 常見依賴

android studio 常見依賴

//----------------------------------------------------------------------------------------

    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1' //---------------------------------------網路------------------------------------------ // 支援 retrofit compile 'com.squareup.retrofit2:retrofit:2.1.0' // https://github.com/square/retrofit // 銜接 retrofit + rxjava compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
// https://github.com/square/retrofit/tree/master/retrofit-adapters // 支援 Gson 解析 compile 'com.squareup.retrofit2:converter-gson:2.1.0' // https://github.com/square/retrofit/tree/master/retrofit-converters // 支援 rxjava compile 'io.reactivex:rxjava:1.1.5' // https://github.com/ReactiveX/RxJava compile 'io.reactivex:rxandroid:1.2.0'
// https://github.com/ReactiveX/RxAndroid //gson解析 compile 'com.google.code.gson:gson:2.8.5' // https://github.com/google/gson // okhttp def OK_HTTP_VERSION = "3.4.1" compile "com.squareup.okhttp3:okhttp:${OK_HTTP_VERSION}" compile "com.squareup.okhttp3:okhttp-urlconnection:${OK_HTTP_VERSION}" compile "com.squareup.okhttp3:logging-interceptor:${OK_HTTP_VERSION}" // https://github.com/square/okhttp //28.7K //------------------------------------動態許可權------------------------------------------- //https://blog.csdn.net/totond/article/details/73648103 以下三者對比 compile "com.github.hotchemi:permissionsdispatcher:4.0.0-alpha1" annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:4.0.0-alpha1" // https://github.com/permissions-dispatcher/PermissionsDispatcher //7.9K //基於RxJava的RxPermissions:需要新增rxjava、rxandroid compile 'com.github.tbruyelle:rxpermissions:0.10.2' // https://github.com/tbruyelle/RxPermissions //7.0K compile 'pub.devrel:easypermissions:1.3.0' // https://github.com/googlesamples/easypermissions //6.3K compile 'com.yanzhenjie:permission:2.0.0-rc12' // https://github.com/yanzhenjie/AndPermission //4.5K /*----------------------------------- 圖片 ------------------------------------*/ //圖片載入 //fresco def FRESCO_VERSION = "1.10.0" //fresco必加 compile "com.facebook.fresco:fresco:${FRESCO_VERSION}" // 在 API < 14 上的機器支援 WebP 時,需要新增(按需新增) compile "com.facebook.fresco:animated-base-support:${FRESCO_VERSION}" // 支援 GIF 動圖,需要新增(按需新增) compile "com.facebook.fresco:animated-gif:${FRESCO_VERSION}" // 支援 WebP (靜態圖+動圖),需要新增(按需新增) compile "com.facebook.fresco:animated-webp:${FRESCO_VERSION}" compile "com.facebook.fresco:webpsupport:${FRESCO_VERSION}" // 僅支援 WebP 靜態圖,需要新增(按需新增) compile "com.facebook.fresco:webpsupport:${FRESCO_VERSION}" // https://github.com/facebook/fresco //glide compile 'com.github.bumptech.glide:glide:4.8.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0' // https://github.com/bumptech/glide //圓形圖片 compile 'de.hdodenhof:circleimageview:2.2.0' // https://github.com/hdodenhof/CircleImageView //手勢圖片 compile 'com.github.chrisbanes.photoview:library:1.2.4' // https://github.com/chrisbanes/PhotoView //仿微信選圖 compile 'me.iwf.photopicker:PhotoPicker:[email protected]' // https://github.com/donglua/PhotoPicker