i build a new project.but i have a little problem.i can't use DefaultHttpClient and HttpPost even after i use it in my previous project already.
Is there any external librery i have to add?
i don't know how can i use both of this.
Help me for this issue.
My build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "Id"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile files('libs/httpcore-4.3.3.jar')
compile files('libs/httpmime-4.3.6.jar')
}
Thanks in advance.........
There are two different DefaultHttpClient classes are available in the jars, you imported the wrong one,
Remove the import of DefaultHttpClient from your class file, and add this one,
One more thing, It should not be HttpPost, it will be HttpClient complete example,