Ran lint on variant debug: 1 issues found

452 views
Skip to first unread message

Kirshan Luhana

unread,
Aug 30, 2015, 6:50:46 AM8/30/15
to Jenkins Users
Hi

I am trying to solve this issue from few days but still can not get any solution please guide how can I fix it.

I am running Jenkins on Windows 10 when I compile Android application I am getting error 


:compileLint
:lint
Ran lint on variant debug: 1 issues found
Ran lint on variant release: 1 issues found
D:\jenkinsjobs\workspace\local.properties:2: Error: Windows file separators (\) must be escaped (\\); use C:\\Users\\kirshan\\AppData\\Local\\Android\\sdk [PropertyEscape]
sdk.dir=C:\\Users\\kirshan\\AppData\\Local\\Android\\sdk
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "PropertyEscape":
   All backslashes and colons in .property files must be escaped with a
   backslash (\). This means that when writing a Windows path, you must escape
   the file separators, so the path \My\Files should be written as
   key=\\My\\Files.

1 errors, 0 warnings
Wrote XML report to D:\jenkinsjobs\workspace\build\reports\lint.xml
:lint FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lint'.
> Lint found errors in the project; aborting build.

Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
    lintOptions {
        abortOnError false
    }
}
...

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Walter Kelt

unread,
Aug 30, 2015, 7:09:13 AM8/30/15
to jenkins...@googlegroups.com
Seems that the error message is documenting the issue nicely. Have you tried the suggested resolution of escaping the backslash ?

Sent from my iPad
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b1c916de-01f0-4b90-a530-93362d29c9a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kirshan Luhana

unread,
Aug 30, 2015, 7:22:32 AM8/30/15
to Jenkins Users
Thanks for quick response. Yes I tried many pattern but all fails :(
tried also shell commands to alter local.property fie as guided here https://wiki.jenkins-ci.org/display/JENKINS/Building+an+Android+app+and+test+project 

Walter Kelt

unread,
Aug 30, 2015, 11:21:49 AM8/30/15
to jenkins...@googlegroups.com
Have you tried using a single  "/" instead of "\" or "\\". Windows can deal with both
types of "separators".

C:/Users/kirshan/AppData/Local/Android/sdk



Kirshan Luhana

unread,
Aug 30, 2015, 3:25:53 PM8/30/15
to Jenkins Users
Thanks again for your feedback.
Yes I tried this pattern already but same problem see bellow results.
There is some discussion on this issue but I am not getting, may be some experience can guide.





sdk.dir=C:/Users/kirshan/AppData/Local/Android/sdk
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "PropertyEscape":
   All backslashes and colons in .property files must be escaped with a
   backslash (\). This means that when writing a Windows path, you must escape
   the file separators, so the path \My\Files should be written as
   key=\\My\\Files.

1 errors, 0 warnings
Wrote XML report to D:\jenkinsjobs\workspace\build\reports\lint.xml
:lint FAILED

Christopher Orr

unread,
Aug 31, 2015, 7:08:43 AM8/31/15
to jenkins...@googlegroups.com
I see a few different problems here.

This doesn't have anything to do with Jenkins, so a better place to ask
would have been an Android mailing list, Stack Overflow, or the Android
Tools (adt-dev) mailing list etc..

The error explanation says that all backslashes *and colons* need to be
escaped, which you haven't done.

Yes, the suggested fix that Lint provides is wrong (it only includes the
backslashes, not the colon), but that was fixed in the bug you linked
to. That bug was fixed in January, so it seems you're still using a
outdated version of the Android SDK tools.

If you believe you have the latest SDK tools, you're escaping the path
correctly, and you *still* have this problem, you can always ignore the
`PropertyEscape` error, or downgrade it to a warning:
https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/user-guide#TOC-Lint-support

Regards,
Chris


On 30/08/15 21:25, Kirshan Luhana wrote:
> Thanks again for your feedback.
> Yes I tried this pattern already but same problem see bellow results.
> There is some discussion on this issue but I am not getting, may be some
> experience can guide.
>
> https://code.google.com/p/android/issues/detail?id=92789
>
>
>
>
> sdk.dir=C:/Users/kirshan/AppData/Local/Android/sdk
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Explanation for issues of type "PropertyEscape":
> All backslashes and colons in .property files must be escaped with a
> backslash (\). This means that when writing a Windows path, you must escape
> the file separators, so the path \My\Files should be written as
> key=\\My\\Files.
>
> 1 errors, 0 warnings
> Wrote XML report to D:\jenkinsjobs\workspace\build\reports\lint.xml
> :*lint* FAILED
>
>
>
>
> On Sunday, 30 August 2015 17:21:49 UTC+2, walter.kelt wrote:
>
>
> Have you tried using a single "/" instead of "\" or "\\". Windows
> can deal with both
> types of "separators".
>
>>> C:/Users/kirshan/AppData/Local/Android/sdk
>
>
>
> On Aug 30, 2015, at 7:22 AM, Kirshan Luhana wrote:
>
>> Thanks for quick response. Yes I tried many pattern but all fails :(
>> tried also shell commands to alter local.property fie as guided
>> here https://wiki.jenkins-ci.org/display/JENKINS/Building+an+Android+app+and+test+project
>> <https://wiki.jenkins-ci.org/display/JENKINS/Building+an+Android+app+and+test+project>
>>
>>
>> On Sunday, 30 August 2015 13:09:13 UTC+2, walter.kelt wrote:
>>
>> Seems that the error message is documenting the issue nicely.
>> Have you tried the suggested resolution of escaping the
>> backslash ?
>>
>> Sent from my iPad
>>
>> On Aug 30, 2015, at 6:50 AM, Kirshan Luhana
>> <kirsha...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> I am trying to solve this issue from few days but still can
>>> not get any solution please guide how can I fix it.
>>>
>>> I am running Jenkins on Windows 10 when I compile Android
>>> application I am getting error
>>>
>>>
>>> :*compileLint*
>>>
>>> :*lint*
>>> Ran lint on variant debug: 1 issues found
>>> Ran lint on variant release: 1 issues found
>>> D:\jenkinsjobs\workspace\local.properties:2: Error: Windows file separators (\) must be escaped (\\); use C:\\Users\\kirshan\\AppData\\Local\\Android\\sdk [PropertyEscape]
>>> sdk.dir=C:\\Users\\kirshan\\AppData\\Local\\Android\\sdk
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> Explanation for issues of type "PropertyEscape":
>>> All backslashes and colons in .property files must be escaped with a
>>> backslash (\). This means that when writing a Windows path, you must escape
>>> the file separators, so the path \My\Files should be written as
>>> key=\\My\\Files.
>>>
>>> 1 errors, 0 warnings
>>> Wrote XML report to D:\jenkinsjobs\workspace\build\reports\lint.xml
>>> :*lint* FAILED

Thorsten Schöning

unread,
Aug 31, 2015, 1:32:48 PM8/31/15
to Jenkins Users
Guten Tag Kirshan Luhana,
am Sonntag, 30. August 2015 um 21:25 schrieben Sie:

> https://code.google.com/p/android/issues/detail?id=92789

Your solution is already mentioned there: The colon needs to be
escaped. Though I don't think this is right, I use paths without
escaped colon but with escaped backslash all the time. The ":" can't
be any key-value-divider in the mentioned example, because "=" is
already present.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning E-Mail: Thorsten....@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/

Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

Kirshan Luhana

unread,
Aug 31, 2015, 2:51:11 PM8/31/15
to Jenkins Users, tscho...@am-soft.de
Dear all

Thank you very much for time and guide. 


How I solved is

By opening Project in Android Studio , Android Studio altered local.property file with 


## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Mon Aug 31 17:33:36 CEST 2015

ndk.dir=C\:\\Users\\kirshan\\AppData\\Local\\Android\\sdk\\ndk-bundle
sdk.dir=C\:\\Users\\kirshan\\AppData\\Local\\Android\\sdk
Reply all
Reply to author
Forward
0 new messages