1

Everything was running smoothly yesterday, but i am getting this error this morning. I don't think it has anything to do with my gradle file since this error is occurring in all of my projects.

I am getting this error:

Unable to load class 'org.bouncycastle.jce.provider.BouncyCastleProvider'.

Possible causes for this unexpected error include:Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

I have tried going offline but it does not seem to work. I have also tried 'Invalide cache and restart'. Can any body tell me what the solution could be?

Edit : App level gradle file

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "in.dreamloft.cplgame2"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner 
       "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.google.android.gms:play-services-auth:10.0.1'
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:cardview-v7:25.2.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.1'
    compile 'com.android.support:design:25.2.0'
    compile 'com.google.firebase:firebase-crash:10.0.1'
    compile 'io.github.jeancsanchez.jcplayer:jcplayer:2.6.0-alpha'
    compile 'com.github.championswimmer:Android-SocialButtons:1.0'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.nightonke:boommenu:2.0.9'
    compile 'com.jakewharton:butterknife:8.5.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.google.firebase:firebase-storage:10.0.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.opentok.android:opentok-android-sdk:2.11.0'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' }

repositories {
    flatDir {
        dirs 'libs'
    } }


apply plugin: 'com.google.gms.google-services'
Community
  • 1
  • 1
Dishonered
  • 8,449
  • 9
  • 37
  • 50

1 Answers1

0

There was nothing wrong the gradle file. I had to update the distribution url to the latest version in the gradle-wrapper.properties file to solve the problem.

Dishonered
  • 8,449
  • 9
  • 37
  • 50