java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/Glide;

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/Glide;

简单 Glide.with(context).load(url).into(image)

同步项目后无法正常工作
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
compile 'com.android.support:support-v4:25.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'

NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile time.

如果使用compiler:4.0.0-RC1则在[=中加入mavenCentral() 13=] 节 .

defaultConfig {
    applicationId "//"
    minSdkVersion //
    targetSdkVersion //


    repositories {
     mavenCentral()
    }

}

或者干脆你可以使用稳定版 .

compile 'com.github.bumptech.glide:glide:4.6.1'