Obsolete
Status Update
Comments
tn...@google.com <tn...@google.com> #2
ch...@google.com <ch...@google.com> #3
Thank you for submitting this issue. It was last modified before Android Studio 1.0 Launched in 2014. We have made a large number of improvements in Android Studio since 2014 and hope this issue is already resolved. In order to correctly prioritize issues in our upcoming release, we are closing this bug. If you continue to experience your issue on the latest stable version of Android Studio, please submit a new bug report. We apologize for any inconvenience this may cause you.
Description
SDK tools version (available in the "About" section of the 'android' tool
UI): 21.1
Eclipse version: N/A
ADT plug-in version: N/A
Platform targeted by your project: android-17
STEPS TO REPRODUCE:
1. Create an a string-array resource with multiple localizations.
2. Have some of the localizations be of a different length, so that Lint reports an InconsistentArrays error
3. Add tools:ignore to all of the string-array elements (even though some of them have the same size)
4. Run lint
EXPECTED RESULTS:
Lint completes successfully and ignores the InconsistentArrays error.
OBSERVED RESULTS:
Lint crashes with a NullPointerException.
If I leave at least one instance of string-array without a tools:ignore flag, lint works as expected.
ADDITIONAL INFORMATION:
Stacktrace:
[lint] Exception in thread "main" java.lang.NullPointerException
[lint] at com.android.tools.lint.detector.api.Location.reverse(Location.java:510)
[lint] at com.android.tools.lint.checks.ArraySizeDetector.afterCheckProject(ArraySizeDetector.java:178)
[lint] at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:821)
[lint] at com.android.tools.lint.client.api.LintDriver.runExtraPhases(LintDriver.java:436)
[lint] at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:391)
[lint] at com.android.tools.lint.Main.run(Main.java:616)
[lint] at com.android.tools.lint.Main.main(Main.java:149)