I have write simple TAG like this:
private static final String TAG = "MainActivity";
String is deprecated
Is there any alternative way available to use String
?
To conclude (and to answer my own question), no, Java will probably stay as the main language for Android programming for a long time. But this doesn't mean Google is not looking for other options to develop in parallel to step away from Java.
Yes you can use deprecated methods as long as the depreciated method exists in the framework. By deprecating a method the platform developers are trying to tell you that either something is wrong with the method or there is already better way for doing the task.
An element may be deprecated for any of several reasons, for example, its usage is likely to lead to errors; it may be changed incompatibly or removed in a future version; it has been superseded by a newer, usually preferable alternative; or it is obsolete.
Short answer: Not possible. @deprecated tags are used by the Android source inside comments as it can be seen in fw/base core/res/values/attrs. xml (see line 3427 for autoText as referred to in the original post), in fw/base core/res/values/public.
As per comment in this java-lang-string-is-deprecated-in-android-studio question,
Remove folder .AndroidStudioX.X in your User folder and Restart IDE.
NOTE:
AndroidStudioX.X
means if you are using Android Studio version 3.4 then .AndroidStudio3.4 will be there.Path will be like Windows :
C:\Users\<PCNAME>\.AndroidStudio3.4
Linux/Ubuntu :
/home/yourname/.AndroidStudio3.4
Hope it will be helpful to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With