Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.6.0] error: incompatible types: NonExistentClass cannot be converted to Annotation @error.NonExistentClass() ^ #2862

Closed
wezley98 opened this issue Feb 1, 2018 · 3 comments

Comments

@wezley98
Copy link

wezley98 commented Feb 1, 2018

Glide Version: 4.6.0
implementation 'com.github.bumptech.glide:glide:4.6.0'
kapt 'com.github.bumptech.glide:compiler:4.6.0'

Integration libraries:
implementation 'com.github.bumptech.glide:okhttp3-integration:4.6.0'

Issue details / Repro steps / Use case background:
Can't compile on Android Studio 3.1-beta1 with version 4.6.0, Glide 4.5.0 compiles fine.

Stack trace / LogCat:

error: incompatible types: NonExistentClass cannot be converted to Annotation @error.NonExistentClass()       ^
@wezley98
Copy link
Author

wezley98 commented Feb 1, 2018

:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest FROM-CACHE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources FROM-CACHE
:app:kaptGenerateStubsDebugKotlin UP-TO-DATE
e: /base/BaseAppGlideModule.java:6: error: incompatible types: NonExistentClass cannot be converted to Annotation
@error.NonExistentClass()
      ^
:app:kaptDebugKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
36 actionable tasks: 2 executed, 2 from cache, 32 up-to-date

@wezley98
Copy link
Author

wezley98 commented Feb 1, 2018

BaseAppGlideModule.java is referenced but I only have a BaseAppGlideModule.kt file, this is the contents. Also the @GlideModule is not resolved.

import com.bumptech.glide.Glide
import com.bumptech.glide.GlideBuilder
import com.bumptech.glide.Registry
import com.bumptech.glide.annotation.GlideModule
import com.bumptech.glide.load.DecodeFormat
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.module.AppGlideModule
import com.bumptech.glide.request.RequestOptions
import com.my.app.util.glide.PaletteBitmap
import com.my.app.util.glide.PaletteBitmapTranscoder

@GlideModule
class BaseAppGlideModule : AppGlideModule() {

    override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
        registry.register(
            Bitmap::class.java,
            PaletteBitmap::class.java,
            PaletteBitmapTranscoder(glide)
        )
    }

    override fun isManifestParsingEnabled(): Boolean {
        return false
    }

    override fun applyOptions(context: Context, builder: GlideBuilder) {
        builder.setDefaultRequestOptions(
            RequestOptions()
                .format(DecodeFormat.PREFER_RGB_565)
                .disallowHardwareConfig()
                .diskCacheStrategy(DiskCacheStrategy.ALL)
        )
    }
}

@sjudd
Copy link
Collaborator

sjudd commented Feb 2, 2018

Duplicate of #2863.

@sjudd sjudd closed this as completed Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants