I’m currently making a simple Google Lens application through firebase and I have this issue. I searched it on Google and it says that this version has a bug and when I try to convert the deprecated code, my MainActivity.java begins to get tons of errors. Is there anything i can do?
Error quote:
This version is deprecated. Details: For more information, refer to documentation for specific features
My Dependencies: (i specified the error code)
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-ml-vision:24.0.3' (ERROR CODE)
implementation 'com.google.firebase:firebase-core:21.0.0'
implementation 'com.google.firebase:firebase-ml-vision-image-label-model:20.0.2'
implementation 'com.android.volley:volley:1.2.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
2
Answers
Here’s the list of available repositories for
firebase-ml-vision
.Replace the latest version with your version, which right now the latest version is :
24.1.0
So you can change version like below: (source)
If your problem didn’t fixed, make sure to check the requirements for this or relative dependencies, in other-hand if upgrading didn’t worked, make sure to provide more details related to activity.
If you’re trying firebase on-device APIs, they should be deprecated and please migrate to use our new ML Kit APIs.
https://developers.google.com/ml-kit/migration
https://developers.google.com/ml-kit/migration/android