简体   繁体   English

Android Studio 2.3.3:皮棉选项,恢复出厂设置

[英]Android studio 2.3.3: lint options, factory reset

Not long time ago I checked all the lint options in Android Studio. 不久前,我检查了Android Studio中的所有绒毛选项。 I thought they were only meant for analyze->inspect code and while working with the project I worked on, it was ok. 我以为它们仅用于分析->检查代码,并且在处理我从事的项目时可以。

Now I started a new project and it's affecting it completely, giving me a lot of lint warnings that sometimes contradict one another. 现在,我开始了一个新项目,它完全影响了它,给了我很多有时甚至彼此矛盾的皮棉警告。

When I checked it manually in my previous project, I could ignore them but now I have a lot of Yellow marks in my code. 当我在以前的项目中手动检查它时,我可以忽略它们,但是现在我的代码中有很多黄色标记。

How can I factory reset the lint options of Android studio? 如何在出厂时重置Android Studio的皮棉选项? There is "reset to default settings" but I think I ruined the defaults. 有“重置为默认设置”,但我认为我破坏了默认设置。 If it's not possible, is there a default lint.xml that I can force it to use? 如果不可能,是否可以强制使用默认的lint.xml?

Please help, I'm drowning with Yellows... Thanks 请帮忙,我淹没了耶洛斯...谢谢

EDIT: I downloaded Android Studio from scratch, reopen the project and the Yellow marks are still there... 编辑:我从头开始下载Android Studio,重新打开该项目,并且黄色标记仍然存在...

This can be done in your module-level build.gradle file. 这可以在module-level build.gradle文件中完成。 Add the following lintOption inside your android closure . 在您的android闭包中添加以下lintOption

The lint tool checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization . lint工具会检查您的Android项目源文件中是否存在潜在的错误,并针对正确性,安全性,性能,可用性,可访问性和国际化进行优化改进。

       lintOptions {
          abortOnError false //Whether lint should set the exit code of the process if errors are found
      }

Eventually I ended up renaming the project's original folder, downloaded Android Studio from the internet, created a new project and copied the relevant files/code from the original folder. 最终,我最终重命名了项目的原始文件夹,从互联网上下载了Android Studio,创建了一个新项目,并从原始文件夹中复制了相关的文件/代码。 Now it's back to normal. 现在恢复正常。

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

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