android-lint

Android Lint complaining about activity not registered in AndroidManifest, but it is

我只是一个虾纸丫 提交于 2019-12-11 03:49:03
问题 When I run Android Lint on my project I get the following warning: The org.slaytanic.SIMLockedRingNotifier.SIMLockedRingNotifierActivity is not registered in the manifest Issue: Ensures that Activities, Services and Content Providers are registered in the manifest Id: Registered Activities, services and content providers should be registered in the AndroidManifext.xml file using , and tags. If your activity is simply a parent class intended to be subclassed by other "real" activities, make it

Jenkins Lint Plugin not picking up results

狂风中的少年 提交于 2019-12-10 18:45:12
问题 I installed the Android Lint Plugin plugin in jenkins and activated it in my Android project build (which is build with maven). Then I added "execute shell" as post build action with the command os_opts="-Djava.awt.headless=true" lint --xml lint-results.xml . as described. The lint-results.xml file is created in the root workspace folder and it contains results. But somehow the plugin does not pick up the results and display them anywhere. I already tried configuring different file names and

Erroneously used mixed-case package-name on an already deployed App, can I change it to lowercase?

╄→гoц情女王★ 提交于 2019-12-10 17:46:41
问题 I have an app on Google Play whose java package name has the last part in mixed-case .. I was looking to remove an Android Lint warning (see this question) and Jens made me notice that Java naming conventions say that you should use only lowercase letters for java package names, and maybe this is what causes the warning.. My app works correctly, but I'd like to change the package name to lowercase, to comply with java naming conventions.. If I change the name of the package to only-lowercase,

Fatal Lint Error during exporting of signed app

一世执手 提交于 2019-12-10 12:38:27
问题 I'm trying to export a signed android app, but I encountered this lint error: And when I go into the xml to look at it, this happens: Is there a way to solve this so that I can continue to sign the app? I don't need them translated since it'll all be in English anyway. 回答1: The problem was with Android Lint. For solving this go to Preferences -> Android -> Lint error Checking. There you can see a list of error checking methods. Scroll to Correctness:Messages . Change the severity of Missing

Ignoring Android Lint “MissingTranslation” check for partial translations

こ雲淡風輕ζ 提交于 2019-12-06 10:51:34
In my app I have a set of languages with complete translations, and another set of languages with translations for only a few strings. For the languages with complete translations, I want Lint to warn me about MissingTranslations. For the languages with partial translations, I want to Lint to ignore the MissingTranslations. I can't figure out how to achieve both of these goals at the same time. On the warning marker, press Ctrl - 1 to show the available quickfixes. You can choose to ignore the warning for a certain file in the quickfix resolution selection. You still have to choose whether it

Android SDK Lint tool Ignoring NewAPI warnings

一个人想着一个人 提交于 2019-12-06 03:02:40
问题 I am running the Lint tool from Eclipse(Android SDK). My settings are default and NewApi is set up as Error in my Android Lint Settings However, when I run Lint (by Package Explorer > Android Tools > Run Lint: Check for Common Errors .), It seems to ignore the fact that I have used API methods higher than the android:minSdkVersion in my manifest XML. What am I doing wrong? UPDATE: I tried to do the check by Lint command line tool by: lint "C:\Android\workspace\MyProject" -- still didnot show

Why a lint warning about fullBackupContent warning when allowBackup is false?

放肆的年华 提交于 2019-12-05 02:29:31
问题 For an app with android:allowBackup="false" , Android lint reports: Should explicitly set 'android:fullBackupContent' to avoid backing up the GCM device specific regId. Is this just a bug in the lint rule, or do I really need to be concerned about the regId getting backed up and restored onto another device? 回答1: This was indeed a bug that was fixed in AS 1.4. Now you only get this lint warning when allowBackup="true" or the attribute is missing (which defaults to true) 来源: https:/

Android - set all lint warnings as errors except for certain ones

佐手、 提交于 2019-12-05 02:24:05
I am trying to make my continuous integration fail the build when new lint warnings that aren't in the lint-baseline.xml file are introduced. I want to have all lint warnings treated as errors (so the build is aborted), but I'd like a way to specify certain lint checks to be treated as informational or warning level so that they still appear in the lint results, but don't cause the build to be aborted. Here is an example of basically what I'd like to do (except this doesn't work, the build fails if any non-ignored warnings exist): lintOptions { lintConfig file("lint.xml") baseline file("lint

@IntDef annotation and return value from other's code that cannot be annotated or how to temporarily disable annotation from affecting the code?

百般思念 提交于 2019-12-05 02:00:11
I am using IntDef from Android Support annotation in my code (but my question is wider in scope so please keep reading :) like this: public class UiLockMode { @IntDef({DEFAULT, NONE, VISIBLE, TRANSPARENT}) @Retention(RetentionPolicy.SOURCE) public @interface AllowedValues {} public static final int DEFAULT = 0; public static final int NONE = 1; public static final int VISIBLE = 2; public static final int TRANSPARENT = 3; } Next, I got some other methods annotated with it like this: protected void setLockMode(@UiLockMode.AllowedValues int lockMode) { ... At that point is all fine and nice but

Strange Lint Warning - Unexpected text found in layout file: “”

有些话、适合烂在心里 提交于 2019-12-04 16:45:40
问题 I've got the following selector defined in button_selector.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:state_enabled="true" android:drawable="@drawable/button_settlement_background_pressed" /> <item android:state_enabled="true" android:drawable="@drawable/button_settlement_background_normal" /> <item android:state_enabled="false" android:drawable="@drawable/button_settlement