Open
Description
Trying to upgrade Android plugin to 4.x as described in #8421 (comment) with some minor workarounds, the build failed with a lint error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':grpc-android-interop-testing: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
}
}
...
Errors found:
/Users/zdapeng/git/grpc-java/android-interop-testing/src/main/AndroidManifest.xml:23: Error: Class referenced in the manifest, io.grpc.binder.HostServices$HostService1, was not found in the project or the libraries [MissingClass]
<service android:name="io.grpc.binder.HostServices$HostService1"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/zdapeng/git/grpc-java/android-interop-testing/src/main/AndroidManifest.xml:24: Error: Class referenced in the manifest, io.grpc.binder.HostServices$HostService2, was not found in the project or the libraries [MissingClass]
<service android:name="io.grpc.binder.HostServices$HostService2"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
dapengzhang0 commentedon Jan 4, 2022
The binder service names in
android-interop-testing/src/main
were introduced in #8563@markb74 Is there a way to fix or workaround it?
markb74 commentedon Jan 5, 2022
I'm ooo right now, but my guess is making the service classes non-inner classes would workaround the problem.
all: Upgrade Android plugin to 4.2.0
dapengzhang0 commentedon Jan 10, 2022
The service class is in
project(':grpc-binder')
and theandroid-interop-testing
project does not haveproject(':grpc-binder')
in itslintClasspath
, so I think the lint check couldn't find the class .I temporarily disabled lint for 'MissingClass' in https://github.com/grpc/grpc-java/pull/8808/files#diff-d9a8dd52c6811ac3eb0e4ed4d260817f55ce2b24ae9b629d4850373346415a6cR52 to workaround it.