我对开发环境设置有疑问。我正在尝试查看是否有可能在development environment(eclipse,android studio)
使用不赞成使用的功能的Android应用程序中发出编译警告(可以是方法,构造函数或您能想到的任何东西)。到现在为止,我一直在手动寻找不赞成使用的功能,而老板要求我根据自己的想法寻找自动设置...
因此,让我们说一个特定的代码:
protected void onPrepareDialog(int paramInt, Dialog paramDialog)
{
try
{
super.onPrepareDialog(paramInt, paramDialog);
AlertDialog localAlertDialog = (AlertDialog)paramDialog;
localAlertDialog.setTitle("Passphrase required");
((TextView)localAlertDialog.findViewById(2131230727)).setText(Preferences.getConfigName(this, getConfigFile()));
Button localButton = localAlertDialog.getButton(-3);
if (this.mOpenVpnService != null);
for (boolean bool = true; ; bool = false)
{
localButton.setEnabled(bool);
return;
}
我在这里有几个不推荐使用的功能,并且android studio声明了它,但是我需要的是对此警告进行自动化的配置,从而免除了我手动遍历每个类的需要...
选择“分析”>“检查代码”以在项目上运行lint。它应该检测项目中任何不推荐使用的方法以及其他常见错误。
您可以选择“按名称运行检查”,然后在此处可以找到“不赞成使用的API”(Java /代码成熟度问题)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句