-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Cannot resolve symbol 'GlideApp' #1939
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
Comments
You need to add the annotationProcessor dependency: annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0' You also need to add an AppGlideModule. See the generated API documentation for details. |
@sjudd I've stumbled on this one as well, somehow with readme reading, @GlideModule part is skipped. Maybe it'd be useful to add it as part of the readme for v4. Just a suggestion :). |
I have the same problem, but my code contains all necessary dependencies
Android Studio 2.3.3, Gradle 3.5.5, Android Gradle 2.3.3. I've read other issues but didn't find anything helpful there. |
Hi, |
@michaelhader i also do it,but it's still not generate glideapp |
In my case I am using Android Studio 3.0 beta2 in app build.gradle I have
I have to use If compiler does not work you should probably see an warning in the LogCat with Glide tag |
same issue: Cannot resolve symbol 'GlideApp' Added all dependencies and annotationProcessor and @GlideModule and it still does not work. Seems this lib is not awesome anymore. |
Same issue here |
Hi all, |
@KENK11 The only solution that worked! Thanks mate. is a joke. Yeah, do a module class, and you're done. Bs. Where do I put this class? Can it be in some kotlin file alongside other classes? Does it need any contents or must be empty? What are the benefits of new system? What particular errors mean and how to solve them? |
don't need that tone... it is open source and most of the maintenance and support is done in free time. Feel free to contribute a better documentation: http://bumptech.github.io/glide/dev/contributing.html#documentation
Have you opened "See Glide’s generated API page for more information."? http://bumptech.github.io/glide/doc/generatedapi.html#kotlin
http://bumptech.github.io/glide/doc/generatedapi.html#about
I think GitHub issues already cover most of them. As far as I remember the resolution was always a missing step from these linked pages.
I think your case is also similar, you missed a step at http://bumptech.github.io/glide/doc/generatedapi.html#kotlin where it links to https://kotlinlang.org/docs/reference/kapt.html |
Lol I just share my solution and take a brief |
@KENK11 Thank you for pointing this out. I've now submitted with a PR to include this in the docs, looks like it'll be in v4.2. |
@DCRichards your welcome :) |
Same issue with me , it worked fine with me in previous project , but in this project i am facing this issue i am using all dependencies
also included glide module import com.bumptech.glide.annotation.GlideModule;
Tried clean,rebuild,make ,project, also did invalidate cache and restart but the issue still exists, I like the old glide where we added only 1 dependency and worked perfectly fine. |
Ok found out the cause after an hour of struggle . There was another issue in my project so my project was unable to build successfully , so GlideApp was not built hence showing this error . All the errors at the starting were of GlideApp and main error was hiding somewhere in the middle . So guys if you did every thing i mentioned above and still getting this error the please check if there is some other issue in the project which is stopping build. |
@Redman1037 I've noticed that Android Studio 3.x is quite selective with its error output, I'd recommend using the command line and inspecting the more verbose output. it's saved me on numerous occasions. |
我遇到一类这问题,其实是后面出现的错误引起的这个提示,仅仅是显示在前面,以为是GlideApp的错误,其实是后面的错误 |
for anyone who is still facing this issue:
inside my application module's build.gradle and the GlideApp class was not generated. I ended up with having both dependencies inside my application module's build.gradle file! |
For those experiencing this issue, also make sure |
Other dependencies use annotationProcessor like butterknife may casue this problem. So check out other annotations' correctness first may be help. |
Just Make a class in your project after this just to clean your project.
|
This is the only answer the solved my this issue for me - https://stackoverflow.com/a/46638213 This configuration worked for me -
Note-
|
In my case, i had another problem unrelated with GlideApp but also a single fail on compile causing fail on GlideApp too. Anyway, glideapp fills all error list and for javac there is a limit for printed errors and it's 50 by default. In this case it was not possible to see what is real problem for me. This is the solution for me to catch real issue.
With this config Android Studio can list till 1000 error and you can see real error at the end of list usually. It was my 376th error :) . Rest was fake GlideApp errors. Yes, i have 375 different class which imports GlideApp, haha. |
Tried just about everything on multiple different SO questions to solve this issue. GlideApp is still not generating. This entire approach just seems like bad design to me and the fact so many people are having a problem is worrying. |
I tried to use Glide 4.80 and stuck for a few days, even after following download & setup page. finally, works after deleted build directory and rebuild. |
Hello everyone, Seems like great discussion going on. Don't worry. I have solution. Follow the steps:
Now you can use GlideApp very easily. 💯 Hope it will helps you. I love Glide as always. <3 |
Gradle sync failed: Could not resolve all dependencies for configuration ':MyProject:x86DebugRuntimeClasspath'. When I use your solution, andorid studio get this error log... have you even been have this error before? |
No, I never ever got this type of error. I am using latest version of Android Studio. |
Same question happened when i update android studio to v3.2.1, but GlideApp works fine in android studio v2.3.0 with same build config and same version of glide(glide v4.0.0).
}` |
Have you tried this: press CTRL+F9 OR you can click on Make Project option in Build menu. It will generate one file automatically (You can see by pressing CTRL and hover on ClassName in File. |
I have tried Make Project and rebuild, it generate GlideApp in build/generated, but just can not found the symbol. Have no idea why cannot resolve the symbol, but it is useful after build apk. |
Few more reasons Glide app wont be generated
|
See here Kotlin guideline to Add Glide to Your App: |
True. I observed the same. |
Well In my case apply plugin: 'kotlin-kapt' caused the ERROR . . |
There could be your project level error and just check at the bottom of the GlideApp error you will find the issue causing this. In my case, it was |
my solution is simply using replace "implementation" with "kapt" in gradle on glideCompiler. |
Must check this: https://stackoverflow.com/a/58267685/1318946 |
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to use glide 4.0.0-RC0 by Gradle:
I followed the example here: https://github.com/bumptech/glide/tree/master/samples/svg/src/main/java/com/bumptech/glide/samples/svg
but after add glide by Gradle, I got error: Cannot resolve symbol 'GlideApp'
My source:
Please help
The text was updated successfully, but these errors were encountered: