file upload - how to add and import multipart library in android studio -


i want add multipart entity library in project please show me way how can download library , add, import android studio 1.2.2.0 thank you.

i'm answering late maybe, faced problem today , didn't find responses. maybe might still help. first answer in so.

  1. so use multipart library in android studio, can download httpcomponents-client-4.x apache site , put httpcore-4.x.jar , httpmime-4.x.jar in libs folder of project directory. , update build.gradle file -

    android {     ....     packagingoptions {         exclude 'meta-inf/dependencies'         exclude 'meta-inf/notice'         exclude 'meta-inf/license'         exclude 'meta-inf/license.txt'         exclude 'meta-inf/notice.txt'     }     .... } 

    and in dependencies add-

    dependencies {     compile filetree(include: ['*.jar'], dir: 'libs')     ...     compile files('libs/httpcore-4.x.jar')     compile files('libs/httpmime-4.x.jar')     ... } 
  2. or can add maven repository adding library names like-

    dependencies {     compile filetree(include: ['*.jar'], dir: 'libs')     ...     compile "org.apache.httpcomponents:httpcore:4.4.1"     compile "org.apache.httpcomponents:httpmime:4.3.6"     ... } 

note: can modify build.gradle of app module directly or can add module setting pressing f4 , in dependencies tab '+' button , select file dependency option 1, library dependency option 2.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -