I'm Getting this Error when I try to integrate Crashlytics with my Project. I used the Crashlytics plugin to generate the code . But when I do a sync in Gradle it gives e the following error. I have also attavhed the build.gradle
Error:Unable to find method 'org.apache.http.conn.ssl.SSLConnectionSocketFactory.(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V'.
Possible causes for this unexpected error include:
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
I have tried Invalidating the cache and also Redownload dependencies and also stoping the Gradle build and starting it.
I'm also connected to the Internet.
The Build works fine if I remove the crashlytics dependency.
Can anyone tell e how to fix this.
build.gradle
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
}
}
dependencies {
compile 'com.android.support:support-v4:23.0.0'
compile 'com.android.support:support-v13:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:palette-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.squareup.okhttp3:okhttp:3.1.2'
compile files('libs/volley.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
}
Solved the Issue. This happened because I was using an older Version of java which has an Incompatable httpcomponents jar, after switching to the latest version the issue was resolved.