Verified
Status Update
Comments
au...@google.com <au...@google.com> #2
Moving to root component so it gets picked up by triage
em...@google.com <em...@google.com>
je...@google.com <je...@google.com>
am...@google.com <am...@google.com> #3
For problem (1) above, the package
attribute in AndroidManifest.xml is the applicationID(either specified in build file or implied from specified namespace) of the app and this should not be specified manually.
For problem (2), an applicationID must be unique to an Apk. There is an Apk generated for integration test whose application id must be different from application under test. It is because both of these Apks are deployed on the device at the same time when integration test is run.
This warning is thrown when the manifest merger process detected namespace conflict but I agree that the warning here can be more descriptive.
Description
I ran into a problem with a new test module in an AndroidX build. The presubmit failed and I was able to reproduce the error by running this:
$ ./gradlew -Pandroidx.validateNoUnrecognizedMessages --rerun-tasks :graphics:integration-tests:testapp:processDebugMainManifest :graphics:integration-tests:testapp:processReleaseMainManifest
This resulted in the following failure:
There are 2 problems with this as an error message (or warning message, which is effectively the same thing since AndroidX presubmit fails on this warning):
It turned out that the problem was that my module was using the same package name as the library that it was testing, and apparently I needed to use a unique package name (for reasons I don't understand). Once I moved the files into a "test" sub-package and then changed the string in my build.gradle file, it all worked.
The request here is to provide more information in the error message so that I could diagnose and fix this one my own (rather than reaching out to the AndroidX team to help).
In case it helps, here is my CL where you can see the changes before/after the fix:https://android-review.git.corp.google.com/c/platform/frameworks/support/+/2212660