android-lint

Kotlin and android lint checks

自闭症网瘾萝莉.ら 提交于 2019-12-04 16:16:08
问题 I am really loving to code android apps in Kotlin recently - but I really miss lint. Anyone knows how to get this back ( at least partially ). Is there a project that adapts the android java lint rules to kotlin? AFAIK lint is not running on bytecode only so there needs to be some manual converting to be done. My main pain-point at the moment is that I need a compile-time error when I use a function < MINSDK level Can someone point me in the right direction? 回答1: The Kotlin team is working on

Is it possible to TextView#getMaxLines() on pre api-16 devices?

你说的曾经没有我的故事 提交于 2019-12-04 14:34:28
I used TextView#getMaxLines() in my application for a few weeks without incident. Lint is now informing me that it's only available in API 16+ ( #setMaxLines() is API 1+...), though (to the best of my knowledge) I haven't modified anything that would cause this sudden flag - my min-sdk has been 8 for a while, and I have files in my source control to prove it. 1) Why could lint be flagging this error randomly? (To be clear, I mean to say that it should have caught it initially - I'm not implying this is something that it shouldn't have flagged at all). 2) Is there any way to retrieve the

Android Eclipse Lint API checks

依然范特西╮ 提交于 2019-12-04 14:16:53
问题 Thanks P.T. for what looks like the correct answer to question Building multi-SDK Android apps in Eclipse without losing compile-time checks. However, when I try to use the @TargetApi() annotation as recommended, it generates syntax errors. @TargetApi(11) // location 1 public class DisplayMessageActivity extends Activity { @Override @TargetApi(11) // location 2 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (Build.VERSION.SDK_INT >= Build.VERSION

Android SDK Lint tool Ignoring NewAPI warnings

China☆狼群 提交于 2019-12-04 08:19:56
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 the newAPI errors However when I did the link check specifically for newAPI: lint --check NewApi "C:

Lint: “Newer Library Versions Available” when using variables

余生颓废 提交于 2019-12-04 05:50:27
I have a project with 3 sub-projects. I want the 3 sub-projects to use the same dependencies versions so I factored all the versions in the root build.gradle : allprojects { ext.versions = [ supportLibVersion: '26.1.0', playServicesVersion: '11.2.2', retrofitVersion: '2.1.0', retrofitConverterGsonVersion: '2.1.0', retrofitRxjava2AdapterVersion: '1.0.0', rxjava2Version: '2.0.5', rxandroidVersion: '2.0.1', timberVersion: '4.5.1', ... ] } Now lint doesn't highlight new libraries available anymore. It somehow still works for the supportLibs but not for the other ones. Any chance I can have this

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-04 01:32:43
问题 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

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

六眼飞鱼酱① 提交于 2019-12-03 21:21:17
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? 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://stackoverflow.com/questions/31767619/why-a-lint-warning-about-fullbackupcontent-warning-when-allowbackup-is-false

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

删除回忆录丶 提交于 2019-12-03 10:35:41
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_background_disabled" /> </selector> When I run lint I get the following warning: Unexpected text found in

Kotlin and android lint checks

时间秒杀一切 提交于 2019-12-03 10:32:10
I am really loving to code android apps in Kotlin recently - but I really miss lint. Anyone knows how to get this back ( at least partially ). Is there a project that adapts the android java lint rules to kotlin? AFAIK lint is not running on bytecode only so there needs to be some manual converting to be done. My main pain-point at the moment is that I need a compile-time error when I use a function < MINSDK level Can someone point me in the right direction? The Kotlin team is working on supporting Android Lint checks for Kotlin code. You can watch this issue to keep track of the progress. In

How to make Grade release build fail using Lint Option StopShip?

ぃ、小莉子 提交于 2019-12-03 10:10:47
问题 I've read a lot about the StopShip Android Lint Check and Gradle support for it http://tools.android.com/tips/lint-checks http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Lint-support http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.LintOptions.html#com.android.build.gradle.internal.dsl.LintOptions:checkReleaseBuilds Android lint enable checks with gradle gradle build fails on lint task http://developer.android.com/tools/help/lint.html