-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Glide compiler for AndroidX project partially supports androidx.annotation
namespace
#3185
Comments
androidx.annotation
androidx.annotation
namespace
For now I temporarily added the below so that there is no longer a compilation error:
|
Temporary fix not working for me with android databinding enabled. |
@Rajeshr34 Hey there, are you using AndroidX? Please post your error as well |
@KevinLeigh Same annotation errors.... also tried to make change and build but its not worked for me. is there any solution for this? |
@Rajeshr34 I am using Glide |
Another thing is you should always clean rebuild your project correctly when making major updates. The reason the temporary fix should work is because |
@KevinLeigh Thank You. its working now
|
@Rajeshr34 All good, glad it is working on your side. |
Hi, |
@kerjani 4.8.0-SNAPSHOT is out
|
@Rajeshr34 is it working for you? here it's still using damn android.support.annotation package rather than android.xannotation |
4.8.0-SNAPSHOT works for me |
I solved this by normally using stable version 4.7.1, and added files Nullable.java and CheckResult.java into my project from Android SDK sources (into correct path android\support\annotation). Then Glide finds its annotation classed, and it works, while my app uses AndroidX. |
I can confirm using Glide version 4.8.0 works for me in combination with androidX. |
In build.gradle In gradle.properties But still having compile time error for |
@friederikewild i have to add "com.android.support:support-annotations:28.0.0-alpha3" in gradle,like this |
(with
in gradle.properties) |
It sounds like this does in fact work, so I'm going to close this issue. If anyone who has gotten it to work is interested, it would be great to have something on our setup page: http://bumptech.github.io/glide/doc/download-setup.html. There's documentation on contributing to that site here: http://bumptech.github.io/glide/dev/contributing.html#documentation |
@HimanshuNarang have you found a fix for this?:
|
I stopped using androidx. But I think according to @PiN73
This will work. |
@HimanshuNarang Maybe I missed something, but I could not get the generated code to import |
So when can we expect a stable release without the need of extra dependencies like the annotationProcessor? It's almost 2019 now. |
Thank you, man. One would not expect this could actually resolve the problem because "support-annotations" was not imported at the very beginning. |
I did further test based on @KevinLeigh solution, it turns out that all we need is to add |
use |
If you are targeting for Android API 28(Pie) and Glide 4.9, then conform to this.
|
@jmhabuild has the correct answer; so if you are using androidx and Glide 4.9.0, add: Since I can't possibly be the only one who was still having problems generating the API, should this not be added to the docs? |
I am getting the same error. Using glide 4.9.0. Any solution? |
A year later and your reply saved me. Thanks a lot! |
Mee too.
So I end-up with: to solve my issue. |
It works for me |
FWIW, the following dependencies are working in my project with Glide 4.9.0 and SDK 28. I recall converting the project to androidx when I was using 4.8.0, then upgraded Glide to 4.9.0.
|
is
the above steps still doesn't works for me, unless I'm using this step: facebook/facebook-android-sdk#591 (comment) (in my case Glide works with this) But, the process doesn't succeed that ways, my other libraries also failed to build Then I've created an SO Question about this migration (for future reader) and "temporary" approach for my problem when migrating to AndroidX |
Currently Glide compiler is partially supporting
androidx.annotation
namespace, currently the AndroidX project I am building is failing because Glide compiler is still usingandroid.support.annotation.CheckResult
andandroid.support.annotation.NonNull
rather than its successorsandroidx.annotation.NonNull
&androidx.annotation.CheckResult
.I have tried with both versions 4.7.1 & 4.8.0-SNAPSHOT
It would be great if the AndroidX annotation namespace is completely supported rather than partially supported.
Basically any occurrence of
android.support.annotation
should change toandroidx.annotation
The text was updated successfully, but these errors were encountered: