问题
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
?
回答1:
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.
来源:https://stackoverflow.com/questions/44402476/java-lang-string-is-deprecated-in-android-studio