Glide: RequestOptions cannot be converted to GlideOptions

Created on 6 May 2019  路  2Comments  路  Source: bumptech/glide

After updating from Glide 4.8.0 to 4.9.0 i get this error.
error: incompatible types: RequestOptions cannot be converted to GlideOptions

Most helpful comment

Forgot to update this and solved my problem.
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

All 2 comments

Forgot to update this and solved my problem.
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

package com.thesimplycoder.imagegallery.helper;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.support.annotation.CheckResult;
import android.support.annotation.DrawableRes;
import android.support.annotation.FloatRange;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.Option;
import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy;
import com.bumptech.glide.request.RequestOptions;
import java.lang.Class;
import java.lang.Cloneable;
import java.lang.SuppressWarnings;

/**

  • Automatically generated from {@link com.bumptech.glide.annotation.GlideExtension} annotated classes.
    *
  • @see RequestOptions
    */
    @SuppressWarnings("deprecation")
    public final class GlideOptions extends RequestOptions implements Cloneable {
    private static GlideOptions fitCenterTransform0;

private static GlideOptions centerInsideTransform1;

private static GlideOptions centerCropTransform2;

private static GlideOptions circleCropTransform3;

private static GlideOptions noTransformation4;

private static GlideOptions noAnimation5;

/**

  • @see RequestOptions#sizeMultiplierOf(float)
    */
    @CheckResult
    @NonNull
    public static GlideOptions sizeMultiplierOf(@FloatRange(from = 0.0, to = 1.0) float value) {
    return new GlideOptions().sizeMultiplier(value);
    }

/**

  • @see RequestOptions#diskCacheStrategyOf(DiskCacheStrategy)
    */
    @CheckResult
    @NonNull
    public static GlideOptions diskCacheStrategyOf(@NonNull DiskCacheStrategy strategy) {
    return new GlideOptions().diskCacheStrategy(strategy);
    }

/**

  • @see RequestOptions#priorityOf(Priority)
    */
    @CheckResult
    @NonNull
    public static GlideOptions priorityOf(@NonNull Priority priority) {
    return new GlideOptions().priority(priority);
    }

/**

  • @see RequestOptions#placeholderOf(Drawable)
    */
    @CheckResult
    @NonNull
    public static GlideOptions placeholderOf(@Nullable Drawable drawable) {
    return new GlideOptions().placeholder(drawable);
    }

/**

  • @see RequestOptions#placeholderOf(int)
    */
    @CheckResult
    @NonNull
    public static GlideOptions placeholderOf(@DrawableRes int id) {
    return new GlideOptions().placeholder(id);
    }

/**

  • @see RequestOptions#errorOf(Drawable)
    */
    @CheckResult
    @NonNull
    public static GlideOptions errorOf(@Nullable Drawable drawable) {
    return new GlideOptions().error(drawable);
    }

/**

  • @see RequestOptions#errorOf(int)
    */
    @CheckResult
    @NonNull
    public static GlideOptions errorOf(@DrawableRes int id) {
    return new GlideOptions().error(id);
    }

/**

  • @see RequestOptions#skipMemoryCacheOf(boolean)
    */
    @CheckResult
    @NonNull
    public static GlideOptions skipMemoryCacheOf(boolean skipMemoryCache) {
    return new GlideOptions().skipMemoryCache(skipMemoryCache);
    }

/**

  • @see RequestOptions#overrideOf(int, int)
    */
    @CheckResult
    @NonNull
    public static GlideOptions overrideOf(@IntRange(from = 0) int value0,
    @IntRange(from = 0) int value1) {
    return new GlideOptions().override(value0, value1);
    }

/**

  • @see RequestOptions#overrideOf(int)
    */
    @CheckResult
    @NonNull
    public static GlideOptions overrideOf(@IntRange(from = 0) int value) {
    return new GlideOptions().override(value);
    }

/**

  • @see RequestOptions#signatureOf(Key)
    */
    @CheckResult
    @NonNull
    public static GlideOptions signatureOf(@NonNull Key key) {
    return new GlideOptions().signature(key);
    }

/**

  • @see RequestOptions#fitCenterTransform()
    */
    @CheckResult
    @NonNull
    public static GlideOptions fitCenterTransform() {
    if (GlideOptions.fitCenterTransform0 == null) {
    GlideOptions.fitCenterTransform0 =
    new GlideOptions().fitCenter().autoClone();
    }
    return GlideOptions.fitCenterTransform0;
    }

/**

  • @see RequestOptions#centerInsideTransform()
    */
    @CheckResult
    @NonNull
    public static GlideOptions centerInsideTransform() {
    if (GlideOptions.centerInsideTransform1 == null) {
    GlideOptions.centerInsideTransform1 =
    new GlideOptions().centerInside().autoClone();
    }
    return GlideOptions.centerInsideTransform1;
    }

/**

  • @see RequestOptions#centerCropTransform()
    */
    @CheckResult
    @NonNull
    public static GlideOptions centerCropTransform() {
    if (GlideOptions.centerCropTransform2 == null) {
    GlideOptions.centerCropTransform2 =
    new GlideOptions().centerCrop().autoClone();
    }
    return GlideOptions.centerCropTransform2;
    }

/**

  • @see RequestOptions#circleCropTransform()
    */
    @CheckResult
    @NonNull
    public static GlideOptions circleCropTransform() {
    if (GlideOptions.circleCropTransform3 == null) {
    GlideOptions.circleCropTransform3 =
    new GlideOptions().circleCrop().autoClone();
    }
    return GlideOptions.circleCropTransform3;
    }

/**

  • @see RequestOptions#bitmapTransform(Transformation)
    */
    @CheckResult
    @NonNull
    public static GlideOptions bitmapTransform(@NonNull Transformation transformation) {
    return new GlideOptions().transform(transformation);
    }

/**

  • @see RequestOptions#noTransformation()
    */
    @CheckResult
    @NonNull
    public static GlideOptions noTransformation() {
    if (GlideOptions.noTransformation4 == null) {
    GlideOptions.noTransformation4 =
    new GlideOptions().dontTransform().autoClone();
    }
    return GlideOptions.noTransformation4;
    }

/**

  • @see RequestOptions#option(Option, T)
    */
    @CheckResult
    @NonNull
    public static GlideOptions option(@NonNull Option option, @NonNull T t) {
    return new GlideOptions().set(option, t);
    }

/**

  • @see RequestOptions#decodeTypeOf(Class)
    */
    @CheckResult
    @NonNull
    public static GlideOptions decodeTypeOf(@NonNull Class clazz) {
    return new GlideOptions().decode(clazz);
    }

/**

  • @see RequestOptions#formatOf(DecodeFormat)
    */
    @CheckResult
    @NonNull
    public static GlideOptions formatOf(@NonNull DecodeFormat format) {
    return new GlideOptions().format(format);
    }

/**

  • @see RequestOptions#frameOf(long)
    */
    @CheckResult
    @NonNull
    public static GlideOptions frameOf(@IntRange(from = 0) long value) {
    return new GlideOptions().frame(value);
    }

/**

  • @see RequestOptions#downsampleOf(DownsampleStrategy)
    */
    @CheckResult
    @NonNull
    public static GlideOptions downsampleOf(@NonNull DownsampleStrategy strategy) {
    return new GlideOptions().downsample(strategy);
    }

/**

  • @see RequestOptions#timeoutOf(int)
    */
    @CheckResult
    @NonNull
    public static GlideOptions timeoutOf(@IntRange(from = 0) int value) {
    return new GlideOptions().timeout(value);
    }

/**

  • @see RequestOptions#encodeQualityOf(int)
    */
    @CheckResult
    @NonNull
    public static GlideOptions encodeQualityOf(@IntRange(from = 0, to = 100) int value) {
    return new GlideOptions().encodeQuality(value);
    }

/**

  • @see RequestOptions#encodeFormatOf(CompressFormat)
    */
    @CheckResult
    @NonNull
    public static GlideOptions encodeFormatOf(@NonNull Bitmap.CompressFormat format) {
    return new GlideOptions().encodeFormat(format);
    }

/**

  • @see RequestOptions#noAnimation()
    */
    @CheckResult
    @NonNull
    public static GlideOptions noAnimation() {
    if (GlideOptions.noAnimation5 == null) {
    GlideOptions.noAnimation5 =
    new GlideOptions().dontAnimate().autoClone();
    }
    return GlideOptions.noAnimation5;
    }
    }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tryking picture Tryking  路  3Comments

sant527 picture sant527  路  3Comments

mttmllns picture mttmllns  路  3Comments

PatrickMA picture PatrickMA  路  3Comments

ghost picture ghost  路  3Comments