I have one AAR file added inside the libs directory in Android Studio project. I have added a proto compiler configurations inside the build.gradle
file. I am trying to add a proto file inside the app module under src/main/proto
directory. The AAR file contains the binding classes only for the same proto file added under the src/main/proto
directory. The AAR file does not contain any proto files. After building a project I am getting error as
R8: Type MyClassGrpcKt$PersistentLoggerCoroutineStub$disable$1 is defined multiple times:
How to configure the proto compiler inside the build.gradle
file to skip the generation of binding classes which is already present or bypass this error
I tried unzipping the AAR file and access the classes.jar
to look for the already generated bindings and skip proto binding generation.
I also tried to add configuration inside proto compiler to look for generated bindings inside the build/generated/src/proto
.
The kotlin classes generated for proto are duplicated and also present inside the build/temp/kotlin-classes
. I tried to delete those also to prevent duplicate classes error.