android studio:找不到符号类GlideDrawable [英] android studio : Cannot find symbol Class GlideDrawable

查看:101
本文介绍了android studio:找不到符号类GlideDrawable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试编译该项目时,我就会遇到问题

i'm having an issue with this project whenever i try to compile it displays the error

错误:找不到符号类GlideDrawable

请看一下app:module

please take a look at app:module

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
    exclude group: 'com.android.support',
    module: 'support-annotations'
  })
  compile 'com.android.support:appcompat-v7:27.0.2'
  compile 'com.android.support:cardview-v7:27.0.2'
  compile 'com.android.support:appcompat-v7:27.0.2'
  compile 'com.android.support:design:27.0.2'
  compile project(':SubProjects:lib_sound_crop')
  compile project(':SubProjects:libraryColorPickrBest')
  compile project(':SubProjects:library_gellaryfinal')
  compile 'com.android.support:multidex:1.0.2'
  implementation 'com.github.bumptech.glide:glide:4.6.0'
  annotationProcessor 'com.github.bumptech.glide:compiler:4.6.0'
  compile 'jp.wasabeef:glide-transformations:2.0.1'
  compile 'com.google.firebase:firebase-messaging:11.8.0'
  compile 'com.google.firebase:firebase-ads:11.8.0'
  compile 'com.google.firebase:firebase-core:11.8.0'
  testCompile 'junit:junit:4.12'

和项目构建

buildscript {
  repositories {
    mavenCentral()
    google()
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.1.1'
  }

预先感谢

推荐答案

GlideDrawable在4.x版本中已贬值,因此,如果您从3.x迁移到4.x,则只需使用Drawable.

GlideDrawable is depreciated in 4.x version so if you are moving from 3.x to 4.x simple use Drawable.

例如,如果您在代码中的某处使用侦听器,则转到简单的此方法.

For example if you are using listener somewhere in code then move to simple this method..

 .listener(new RequestListener<Drawable>() {
                @Override
                public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
                    progressBar.setVisibility(View.GONE);
                    return false;
                }

                @Override
                public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
                    progressBar.setVisibility(View.GONE);
                    return false;
                }
            })

这篇关于android studio:找不到符号类GlideDrawable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆