Glide: Glide 4.9.0 carsh

Created on 22 Feb 2019  Â·  24Comments  Â·  Source: bumptech/glide

java.lang.NoSuchMethodError: No super method apply(Lcom/bumptech/glide/request/RequestOptions;)Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/com.yanjing.voice-1/base.apk:classes38.dex)
at com.jess.arms.http.imageloader.glide.GlideOptions.apply(GlideOptions.java:605)
at com.jess.arms.http.imageloader.glide.GlideRequests.setRequestOptions(GlideRequests.java:170)
at com.bumptech.glide.RequestManager.(RequestManager.java:136)
at com.bumptech.glide.RequestManager.(RequestManager.java:94)
at com.jess.arms.http.imageloader.glide.GlideRequests.(GlideRequests.java:38)
at com.bumptech.glide.GeneratedRequestManagerFactory.build(GeneratedRequestManagerFactory.java:19)
at com.bumptech.glide.manager.RequestManagerRetriever.supportFragmentGet(RequestManagerRetriever.java:441)
at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:134)
at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:116)
at com.bumptech.glide.Glide.with(Glide.java:716)

Glide.with(context)
.load(url)
.error(errorHolder)
.fallback(errorHolder)
.placeholder(placeHolder)
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(imageView);

Most helpful comment

This seems like a major bug in Glide that needs to be fixed. Like many larger apps, it is hard to manage all the transitive dependencies in our app, so it's a big problem when a minor version change in a library causes a crash.

We hit this incompatibility between Glide 4.6.1 and 4.9.0, resulting in the same crash reported in this thread:

java.lang.NoSuchMethodError: No virtual method override(II)Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of ‘com.bumptech.glide.request.RequestOptions’ 

Running japicmp seems to confirm the binary incompatibility in the RequestOptions class:

$ java -jar japicmp-0.14.1-jar-with-dependencies.jar -n glide-4.9.0/classes.jar -o glide-4.6.1/classes.jar  --ignore-missing-classes 
...
***! MODIFIED CLASS: PUBLIC com.bumptech.glide.request.RequestOptions  (not serializable)
    ===  CLASS FILE FORMAT VERSION: 51.0 <- 51.0
    ===  UNCHANGED INTERFACE: java.lang.Cloneable
    ===  UNCHANGED CONSTRUCTOR: PUBLIC RequestOptions()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions apply(com.bumptech.glide.request.RequestOptions)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions autoClone()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions bitmapTransform(com.bumptech.glide.load.Transformation)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions centerCrop()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions centerCropTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions centerInside()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions centerInsideTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions circleCrop()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions circleCropTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions clone()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions decode(java.lang.Class)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions decodeTypeOf(java.lang.Class)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions disallowHardwareConfig()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions diskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions diskCacheStrategyOf(com.bumptech.glide.load.engine.DiskCacheStrategy)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions dontAnimate()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions dontTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions downsample(com.bumptech.glide.load.resource.bitmap.DownsampleStrategy)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions downsampleOf(com.bumptech.glide.load.resource.bitmap.DownsampleStrategy)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions encodeFormat(android.graphics.Bitmap$CompressFormat)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions encodeFormatOf(android.graphics.Bitmap$CompressFormat)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions encodeQuality(int)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions encodeQualityOf(int)
    ---  REMOVED METHOD: PUBLIC(-) boolean equals(java.lang.Object)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions error(android.graphics.drawable.Drawable)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions error(int)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions errorOf(android.graphics.drawable.Drawable)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions errorOf(int)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions fallback(android.graphics.drawable.Drawable)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions fallback(int)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions fitCenter()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions fitCenterTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions format(com.bumptech.glide.load.DecodeFormat)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions formatOf(com.bumptech.glide.load.DecodeFormat)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions frame(long)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions frameOf(long)

Please can this issue be reopened and Glide be updated to be binary compatible?

All 24 comments

Are you using multiple libraries with multiple versions of Glide? If you can reproduce this in a sample app, please attach it here.

Are you using multiple libraries with multiple versions of Glide? If you can reproduce this in a sample app, please attach it here.

No,I use Android Studio terminal gradlew :app:dependencies,not found multiple versions,

change versions is 4.8.0 run it's ok.why?

`ext {
android = [
compileSdkVersion: 28,
minSdkVersion : 19,
targetSdkVersion : 26,
versionCode : 6,
versionName : "2.0.0",
]
version = [
androidSupportSdk: "27.1.1",
androidAnnotation: "4.4.0",
butterknife : "8.5.1",
greendao : "3.2.2",
dagger : "2.16",
okhttp3 : "3.11.0",
]

dependencies = [
        // support
        "support-v4"               : "com.android.support:support-v4:${version["androidSupportSdk"]}",
        "appcompat-v7"             : "com.android.support:appcompat-v7:${version["androidSupportSdk"]}",
        "design"                   : "com.android.support:design:${version["androidSupportSdk"]}",
        "cardview"                 : "com.android.support:cardview-v7:${version["androidSupportSdk"]}",
        "recyclerview"             : "com.android.support:recyclerview-v7:${version["androidSupportSdk"]}",
        "constraint-layout"        : "com.android.support.constraint:constraint-layout:2.0.0-alpha1",

        // view
        "butterknife"              : "com.jakewharton:butterknife:${version["butterknife"]}",
        "butterknife-compiler"     : "com.jakewharton:butterknife-compiler:${version["butterknife"]}",
        "base-quick-adapter"       : "com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.40",
        "greendao"                 : "org.greenrobot:greendao:${version["greendao"]}",
        "photoview"                : "com.github.chrisbanes:PhotoView:2.1.3",
        //network
        "glide"                    : "com.github.bumptech.glide:glide:4.9.0",
        "glide-annotationProcessor": "com.github.bumptech.glide:compiler:4.9.0",
        //"glide-transformations"    : "jp.wasabeef:glide-transformations:2.0.2",
        //toolsw
        "gson"                     : "com.google.code.gson:gson:2.8.5",
        "dagger"                   : "com.google.dagger:dagger:${version["dagger"]}",
        "dagger-android"           : "com.google.dagger:dagger-android:${version["dagger"]}",
        "dagger-compiler"          : "com.google.dagger:dagger-compiler:${version["dagger"]}",
        "dagger-android-support"   : "com.google.dagger:dagger-android-support:${version["dagger"]}",
        "dagger-android-processor" : "com.google.dagger:dagger-android-processor:${version["dagger"]}",
        "okhttp3"                  : "com.squareup.okhttp3:okhttp-urlconnection:${version["okhttp3"]}",
]

}`

Maybe related to #3531, but probably a build issue. If you can reproduce this in a simple sample app I can take a look. Duping into the other issue for now.

I'm facing same issue. One of my dependency internally using glide 4.6.1 and i'm using glide 4.9.
What i observed is, in 4.6.1 apply method was in RequestOptions class, but in 4.9 it has been removed.

I just updated to Glide 4.9 this same thing happened. Why isn't this solved already?

same issue here

Maybe related to #3531, but probably a build issue. If you can reproduce this in a simple sample app I can take a look. Duping into the other issue for now.

This is a serious problem,you review, please.

got the same issue

I am also getting a similar error i have glide using the latest version 4.9.0 and a dependancy that included glide 4.8.0 the app crushes , so i downgraded my glide version to match the version provided by the dependency but unfortunately it kept crushing with the same trace as below , seems like two versions of glide even when identical cant be installed on the same set up

2019-06-17 20:10:49.293 16698-16698/ke.co.tinker.jcam E/AndroidRuntime: FATAL EXCEPTION: main Process: ke.co.tinker.jcam, PID: 16698 java.lang.NoSuchMethodError: No super method apply(Lcom/bumptech/glide/request/RequestOptions;)Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of 'com.bumptech.glide.request.RequestOptions' appears in /data/app/ke.co.tinker.jcam-rbucb3S8C8xBcbz14uL1Vw==/split_lib_dependencies_apk.apk) at com.github.irshulx.GlideOptions.apply(GlideOptions.java:605) at com.github.irshulx.GlideRequests.setRequestOptions(GlideRequests.java:170) at com.bumptech.glide.RequestManager.<init>(RequestManager.java:136) at com.bumptech.glide.RequestManager.<init>(RequestManager.java:94) at com.github.irshulx.GlideRequests.<init>(GlideRequests.java:38) at com.bumptech.glide.GeneratedRequestManagerFactory.build(GeneratedRequestManagerFactory.java:19) at com.bumptech.glide.manager.RequestManagerRetriever.supportFragmentGet(RequestManagerRetriever.java:441) at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:134) at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:116) at com.bumptech.glide.Glide.with(Glide.java:716) at ke.co.tinker.jcam.adapter.HomeDataAdapter.onBindViewHolder(HomeDataAdapter.java:127) at ke.co.tinker.jcam.adapter.HomeDataAdapter.onBindViewHolder(HomeDataAdapter.java:50) at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6781) at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6823) at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5752) at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6019) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854) at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230) at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1557) at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517) at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:612) at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924) at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3641) at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4194) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:625) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1915) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at androidx.appcompat.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:444) at android.view.View.layout(View.java:22407) 2019-06-17 20:10:49.294 16698-16698/ke.co.tinker.jcam E/AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656) at android.widget.LinearLayout.onLayout(LinearLayout.java:1565) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:1041) at android.view.View.layout(View.java:22407) at android.view.ViewGroup.layout(ViewGroup.java:6579) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3357) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2826) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1874) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8491) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949) at android.view.Choreographer.doCallbacks(Choreographer.java:761) at android.view.Choreographer.doFrame(Choreographer.java:696) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7058) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

It seems you should align all the Glide version to 4.9 to avoid such crash.

Compile with implementation 'com.github.bumptech.glide:glide:4.5.0' and fix it

I found the same error, please fix it

Cambie a

implementation 'com.github.bumptech.glide:glide:4.5.0'// error si se
actuazliza
annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'

A la version 4.5.0 y we arreglo en mi caso

On Jul 18, 2019 4:03 AM, "Hy" notifications@github.com wrote:

I found the same error, please fix it

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/bumptech/glide/issues/3539?email_source=notifications&email_token=ACMXIVYHNYNDBOMKJXIZFRDP77TQJA5CNFSM4GZFJV52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2HIEZI#issuecomment-512655973,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACMXIVYVX25GZQ3GL2FZAYLP77TQJANCNFSM4GZFJV5Q
.

+1

It could be because of some other third party library must also be using glide with a different version than you have in your code.
Either remove glide dependency from Gradle or exclude glide dependency from the library that uses it.
eg exclude group: "com.github.bumptech.glide"

This seems like a major bug in Glide that needs to be fixed. Like many larger apps, it is hard to manage all the transitive dependencies in our app, so it's a big problem when a minor version change in a library causes a crash.

We hit this incompatibility between Glide 4.6.1 and 4.9.0, resulting in the same crash reported in this thread:

java.lang.NoSuchMethodError: No virtual method override(II)Lcom/bumptech/glide/request/RequestOptions; in class Lcom/bumptech/glide/request/RequestOptions; or its super classes (declaration of ‘com.bumptech.glide.request.RequestOptions’ 

Running japicmp seems to confirm the binary incompatibility in the RequestOptions class:

$ java -jar japicmp-0.14.1-jar-with-dependencies.jar -n glide-4.9.0/classes.jar -o glide-4.6.1/classes.jar  --ignore-missing-classes 
...
***! MODIFIED CLASS: PUBLIC com.bumptech.glide.request.RequestOptions  (not serializable)
    ===  CLASS FILE FORMAT VERSION: 51.0 <- 51.0
    ===  UNCHANGED INTERFACE: java.lang.Cloneable
    ===  UNCHANGED CONSTRUCTOR: PUBLIC RequestOptions()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions apply(com.bumptech.glide.request.RequestOptions)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions autoClone()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions bitmapTransform(com.bumptech.glide.load.Transformation)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions centerCrop()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions centerCropTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions centerInside()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions centerInsideTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions circleCrop()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions circleCropTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions clone()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions decode(java.lang.Class)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions decodeTypeOf(java.lang.Class)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions disallowHardwareConfig()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions diskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions diskCacheStrategyOf(com.bumptech.glide.load.engine.DiskCacheStrategy)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions dontAnimate()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions dontTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions downsample(com.bumptech.glide.load.resource.bitmap.DownsampleStrategy)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions downsampleOf(com.bumptech.glide.load.resource.bitmap.DownsampleStrategy)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions encodeFormat(android.graphics.Bitmap$CompressFormat)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions encodeFormatOf(android.graphics.Bitmap$CompressFormat)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions encodeQuality(int)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions encodeQualityOf(int)
    ---  REMOVED METHOD: PUBLIC(-) boolean equals(java.lang.Object)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions error(android.graphics.drawable.Drawable)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions error(int)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions errorOf(android.graphics.drawable.Drawable)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions errorOf(int)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions fallback(android.graphics.drawable.Drawable)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions fallback(int)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions fitCenter()
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions fitCenterTransform()
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions format(com.bumptech.glide.load.DecodeFormat)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions formatOf(com.bumptech.glide.load.DecodeFormat)
    ---! REMOVED METHOD: PUBLIC(-) com.bumptech.glide.request.RequestOptions frame(long)
    ===  UNCHANGED METHOD: PUBLIC STATIC com.bumptech.glide.request.RequestOptions frameOf(long)

Please can this issue be reopened and Glide be updated to be binary compatible?

Your issue stems from including two different versions of Glide in the same binary. This may have happened to not crash, but Glide makes no guarantee that it works or is safe even if it doesn't crash. Internals and API of Glide may evolve even over minor versions. I don't think this is unusual - you will generally have a hard time including two different versions of any library.

Sorry to say, but I think your best option is to try to align your dependencies to use a single version of Glide.

I had the same problem, but I solved it。The reason I made a mistake was that I upgraded the version in my project to 4.9.0,But the aar version that my project relies on is still 4.8.0, and all of my Glide initialization is done in the aar,When I upgraded the Gilde version in the base library to 4.9.0 and rebuild it,All the problems have been solved

The reason I made a mistake was that I upgraded the version in my project to 4.9.0,But the aar version that my project relies on is still 4.8.0

@qianshengta this is not a mistake. 4.8 should be binary compatible with 4.90. I am disappointed that a 4.9.1 hotfix was released to address this

Glide makes no guarantee that it works or is safe even if it doesn't crash. Internals and API of Glide may evolve even over minor versions.

Semantic versioning means that only major version releases are binary incompatible

I had the same issue. There was nothing wrong with glide 4.9.0. I have found one of my libraries was dependent on Glide old version So I updated that library and that solved my issue.

There may be a module library in your project. If it is so;

  • Press Ctrl + Shift + F
  • Search 'com.github.bumptech.glide:glide'
  • Make their's versions same and
  • Sync and build.

I had the same issue. There was nothing wrong with glide 4.9.0. I have found one of my libraries was dependent on Glide old version So I updated that library and that solved my issue.

Update library with which version ?

It could be because of some other third party library must also be using glide with a different version than you have in your code.
Either remove glide dependency from Gradle or exclude glide dependency from the library that uses it.
eg exclude group: "com.github.bumptech.glide"

You can't just abondon another library or upgrade it to use the latest version of Glide. What if that library uses a deprecated Glide method; it's not gonna reconstruct itself, right?! In your second case you're still causing the app and Glide-dependent library to use different versions of Glide. Practically, your comment makes no sense.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Anton111111 picture Anton111111  Â·  3Comments

Tryking picture Tryking  Â·  3Comments

kooeasy picture kooeasy  Â·  3Comments

MrFuFuFu picture MrFuFuFu  Â·  3Comments

piedpiperlol picture piedpiperlol  Â·  3Comments