Android 程序类型已存在:com.bumptech.glide.BitmapOptions

Android 程序类型已存在:com.bumptech.glide.BitmapOptions,android,Android,我的目的是用glide加载图片。编译android项目时,会出现如下错误: 程序类型已存在:com.bumptech.glide.BitmapOptions消息{kind=ERROR,text=Program type已存在:com.bumptech.glide.BitmapOptions,sources=[未知源文件],toolname=Optional.of(D8)} 这个问题困扰了我很长时间,谢谢你的回答 build.gradle: apply plugin: 'com.android.a

我的目的是用glide加载图片。编译android项目时,会出现如下错误: 程序类型已存在:
com.bumptech.glide.BitmapOptions消息{kind=ERROR,text=Program type已存在:com.bumptech.glide.BitmapOptions,sources=[未知源文件],toolname=Optional.of(D8)}
这个问题困扰了我很长时间,谢谢你的回答

build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "com.example.usercenter"
        minSdkVersion 15
        targetSdkVersion 26
        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(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'jp.wasabeef:glide-transformations:2.0.1'
    compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
}
Mainactivity.java:

    public class MainActivity extends AppCompatActivity {
        private ImageView blurImageView;
        private ImageView avatarImageView;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            this.requestWindowFeature(Window.FEATURE_NO_TITLE);//
            setContentView(R.layout.activity_main);//
            blurImageView = (ImageView) findViewById(R.id.iv_blur);//
            avatarImageView = (ImageView) findViewById(R.id.iv_avatar);//

            Glide.with(this).load(R.drawable.head)
                    .bitmapTransform(new BlurTransformation(this, 25), new CenterCrop(this))
                    .into(blurImageView);

            Glide.with(this).load(R.drawable.head)
                    .bitmapTransform(new CropCircleTransformation(this))
                    .into(avatarImageView);
        }
    }
Who can help me,please?

删除
编译'com.github.bumptech.glide:glide:3.7.0'

使用最新版本

dependencies {
    implementation 'jp.wasabeef:glide-transformations:3.3.0'

}
然后清除-重新构建-运行您的项目