I am having Error Unable to merge dex in my project. i applied different answers from StackOverFlow like:
defaultConfig {
multiDexEnabled true
}
dependencies {
compile 'com.android.support:multidex:1.0.1'}
<application
android:name="android.support.multidex.MultiDexApplication"
and applied in manifest as well.i cleaned project Rebuild /MakeProject and applied all other option provided by users in answers but getting that error. when i enable multidex then i got list of errors converting byte to dex. I don't know what i am missing in that. here is my App Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.hp_pc.cerv"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dexOptions {
preDexLibraries = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
// compile files('libs/httpclient-4.2.3.jar')
// compile files('libs/httpmime-4.3.jar')
// compile files('libs/httpcore.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.github.pinball83:masked-edittext:1.0.3'
// compile 'com.google.android.gms:play-services-maps:9.8.0'
compile 'com.android.support:design:23.4.0'
compile 'com.wdullaer:materialdatetimepicker:2.5.0'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'joda-time:joda-time:2.9.4'
testCompile 'junit:junit:4.12'
}
and here is my Project Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}