Hello User, in this Article I will tell you how to Recompile with Xlint deprecation in Android Studio. This problem is showing because of using deprecated API in Android Studio. Sometimes we add some dependency which contains deprecated API. Because of these dependencies we face the problem of deprecated API. We also cannot find the solution in Android Studio for solving this problem. There is a warning message we can see which some input files are use or override a deprecated API Android Studio. So, in this Article we will see How to Recompile with Xlint deprecation for details.
Recompile with Xlint deprecation for details
Some input files use or override a deprecated API
Here you can see there are 2 warnings showing in the project. So, we will find the problem by recompile with Xlint deprecation.
Paste this code in the build.gradle(project) file. Here I have attached a photo where you can paste this code. So, Watch the image carefully and paste the code.
Here you can see I have highlighted the code in the photo. So, paste the code here. After pasting this code sync the project and also run the project after successfully syncing. Now, you can easily find the deprecated code, it will show you where you have used unsafe or deprecated codes.
Here you can see that I get the complete details of the warning what was the problem. You can also solve this problem into you project easily. Just do this simple step and solve this. Now I have discussed about deprecate API below. But I strongly recommend you use the new API or method or class which is comes in the replacement of the deprecated API. I hope you have successfully fixed your problem. If you want a YouTube video on this topic or any other topic, then you can contact me. I have provided many sources of contact.
Can I use deprecated API?
Yes, you can use deprecated API without any problem if it is working for you. Sometimes in the new API which is comes in the replacement of Old API contains bugs. So, in that situation we use the Old deprecated API and wait for solving the bugs in the new API.
Why an API becomes deprecated?
The API or methods or class may be deprecated at any time because of many reasons. Sometimes they evolute a new API with added some extra features, the old API may complicate in use, deprecated API may contain a lot of bugs and many other reasons.
Thank you for visiting our website and don't forget to Subscribe our YouTube channel and Telegram group for getting immediate help of any problems. We always try to encourage new people in this community and make the community bigger. We think the future of the coding community is bright. I also hope that this Article really helps you and if you find any problem or error then you can directly contact me on WhatsApp. Thank you
0 Comments