Obsolete
Status Update
Comments
tn...@google.com <tn...@google.com> #2
As I understand it, we need to migrate namespace definitions both from AndroidManifest.xml
and from implicit definitions from applicationId
/ testApplicationId
? Is that right? So an 8.0 project would have a
namespace <n>
testNamespace <tn>
where <n> is taken from AndroidManifest.xml
package
definitions if present, and applicationId
if not, and <tn>
is testApplicationId
if present and <n>.test
if not?
ch...@google.com <ch...@google.com> #3
Sorry for the confusion. AGP would change how it computes the namespace for the androidTest variant. All the Upgrade assistant would need to do is update the source code for the import of the R
class.
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)