java - 无法加载类 'org.bouncycaSTLe.jce.provider.BouncyCaSTLeProvider'

标签 java android gradle

昨天一切运行顺利,但是今天早上我收到了这个错误。我不认为这与我的gradle文件有任何关系,因为在我所有的项目中都发生了此错误。
我收到此错误:

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.


我曾尝试过离线,但似乎无法正常工作。我也尝试过
“无效的缓存并重新启动”。
谁能告诉我解决方案是什么?
编辑:应用程序级别gradle文件
 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'

最佳答案

gradle文件没有错。我必须将分发URL更新为gradle-wrapper.properties文件中的最新版本,以解决该问题。

关于java - 无法加载类 'org.bouncycaSTLe.jce.provider.BouncyCaSTLeProvider',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44405311/

相关文章:

java - 导出的Jar文件未执行

android - 有什么方法可以提高带有背景图像的 xamarin.android ui 性能

android - 无法从 BasicCookieStore 转换为 CookieStore

gradle - Gradle:是否可以发布到Gradle自己的本地缓存?

java - 在java中反转并打印单链表

Java 反射实例检查不同类

java - Android SDK public void 获取错误

java - 如何获取 Gradle Artifact 转换的输出?

gradle - TeamCity-如何在Gradle中访问环境变量

Java DTO 到 TypeScript