简体   繁体   English

android-studio取消声明为不推荐使用

[英]android-studio Undeclare as deprecated

How do I undeclare something as deprecated in android studio? 如何取消声明android studio中已弃用的内容?

The specific case of mine: java.lang.String is declared as deprecated in every (also new) Project. 我的特定情况:java.lang.String在每个(也是新的)Project中都声明为不推荐使用。 I can't find any solution to this, neither at stackoverflow, the android studio settings/docs nor in the rest of the whole internet ':D 我找不到任何解决方案,无论是在stackoverflow,android studio settings / docs还是整个互联网':D

Android studio gave me (while declaring a variable) the option to declare 'String' as deprecated, and I wanted to try it, but thought I would to be able to undeclare it in the same easy fashion.. but nope. Android Studio给了我(在声明变量的同时)声明“ String”已弃用的选项,我想尝试一下,但我想我能够以同样简单的方式取消声明它。

Any suggestions? 有什么建议么?

That seems quite strange. 那似乎很奇怪。 Deprecating is something that you can't really do by yourself in the JDK. 在JDK中,过时是您无法真正做到的。

You may be able to search for the annotations.xml in a directory via the SDK annotations tab and change it there. 您可以通过SDK的“注释”选项卡在目录中搜索“ annotations.xml”并在其中进行更改。 Or maybe there is a 'deannotate' option when right clicking it? 或者右键单击它时可能有一个“ deannotate”选项?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM