android-lint

How is lint integrated with IntelliJ inspections in Android Studio?

别等时光非礼了梦想. 提交于 2019-12-02 03:48:01
问题 I understand that there are two types of inspections in Android Studio, those which are inherited from IntelliJ and those which are inherited from lint (see: Android lint on command-line missing issue groups (versus options available in Android Studio)). I also understand that when you write a custom lint rule and add it to an Android project it is automatically converted into an inspection. Based on these two assertions I am lead to believe there is a mechanism which converts lint rules to

How is lint integrated with IntelliJ inspections in Android Studio?

筅森魡賤 提交于 2019-12-02 01:33:41
I understand that there are two types of inspections in Android Studio, those which are inherited from IntelliJ and those which are inherited from lint (see: Android lint on command-line missing issue groups (versus options available in Android Studio) ). I also understand that when you write a custom lint rule and add it to an Android project it is automatically converted into an inspection. Based on these two assertions I am lead to believe there is a mechanism which converts lint rules to IntelliJ inspections. In this article it states "Using the Structural Search Inspection is the only way

Warnings in xml resources

夙愿已清 提交于 2019-12-01 09:29:15
Yesterday I installed ADT plug-in again as I was having problems (intermittent) with the version I already had. The thing is, I'm not getting warnings in all my xml resources. I am pretty darned sure I haven't seem them before. Some of these are annoying because I cannot do anything about it: Nested weights are bad for performance The resource R.attr.TextAppearance_Group_Small appears to be unused Replace "..." with ellipsis character (…, …)? Others that I've had to fix include: This tag and its children can be replaced by one <TextView/> and a compound drawable [Accessibility] Missing

Warnings in xml resources

ぐ巨炮叔叔 提交于 2019-12-01 07:07:48
问题 Yesterday I installed ADT plug-in again as I was having problems (intermittent) with the version I already had. The thing is, I'm not getting warnings in all my xml resources. I am pretty darned sure I haven't seem them before. Some of these are annoying because I cannot do anything about it: Nested weights are bad for performance The resource R.attr.TextAppearance_Group_Small appears to be unused Replace "..." with ellipsis character (…, …)? Others that I've had to fix include: This tag and

When i update my ADT plugin for Android i get run android lint ,what are adavantages of it to use it for android project?

走远了吗. 提交于 2019-12-01 06:46:06
Every One Here When i update my ADT plugin to ADT 16 i get One new (Tool)thing which is run android Lint when i run it after select my android project it give me more 550 warning related to project for android .should i have to follow advise by Lint for my resource like String.xml and some of layout use in my activity . For Knowing more about Lint i refer this tips here is Click here It also Give me Warning Like Below : Hardcoded string "AnyThing", should use @string resource So what i think is Lint will help for resource problem in android. If you have more thing about android lint then let

Android Lint: How to suppress all warnings associated with support library?

£可爱£侵袭症+ 提交于 2019-12-01 04:06:52
问题 I am trying to use Android Lint to keep my code running smoothly but since I'm using support-v7-appcompat, Lint returns an enormous, overflowing list of warnings. How can I suppress all of them so I can only see issues with my own app? In the Lint Overflow menu, there are options for "Check all Projects", "check android-support-v7-appcompat", and "check [myapp]" - but clicking [myapp] also shows a vast amount of errors regarding abc_ (support library) and trying to suppress them by selecting

How to address android lint complaint about exported Firebase Messaging service implementations?

一世执手 提交于 2019-11-30 12:39:39
问题 Following the Google developer instructions on implementing Firebase in my app, I notice that android lint complains. The idea is that we have to implement two services which inherit from Firebase services: public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService { ... } public class MyFirebaseMessagingService extends FirebaseMessagingService { ... } and then register those services in the manifest. But, it's not quite perfect. In particular, these two recommended

Android API level annotation for Android libraries

坚强是说给别人听的谎言 提交于 2019-11-30 08:39:29
I am writing an Android library. The vast majority of the interface in the lbirary supports Android API level 10 or above. Some functionality, though, requires a higher API level. For instance, part of the library requires API 18 for Bluetooth Low Energy. For the sake of concreteness, let's say that the library produces three classes ClassA , ClassB and ClassC . ClassA uses functionality available in API 10, ClassB uses functionality available in API 14 and ClassC uses functionality available in API 18. I want to be able to trigger a lint issue (warning/error) whenever someone uses a class

Context of lint.xml and inspection profile

巧了我就是萌 提交于 2019-11-30 08:27:06
In Android Studio there is the lint.xml configuration and ./idea/inspectionProfiles/.xml manageable via Settings => Editor => Inspections . I understand lint.xml is used by lint command line tool and the inspection profile is used by Android Studio IDE. The official documentation is here . I also found this post How is lint integrated with IntelliJ inspections in Android Studio? and this post Android lint on command-line missing issue groups (versus options available in Android Studio) . This answer has a good example of lintOptions{ } block in build.gradle. Yet there is some information

Constant 'Running Android Lint' Failed, nullpointerexception popping up in Eclipse (but doesn't seem to be my code)

◇◆丶佛笑我妖孽 提交于 2019-11-30 08:08:35
I don't recall what it is I updated (probably some android ADK items), but suddenly I keep getting a "Problem Occurred" text box in Eclipse, frequently . It says: 'Running Android Lint' has encountered a problem. Failed And there is an OK and a Details button. When I click Details, I get: Failed java.lang.NullPointerException From the text box, I can't tell what it is that failed....it sounds like the running of Lint itself failed, and failed from a NPE. There is no line number associated with any of my code anywhere, so I don't think it's from my code. I've tried disabling running Lint along