josesamuel / remoter

Remoter - An alternative to Android AIDL for Android Remote IPC services using plain java interfaces
Apache License 2.0
84 stars 14 forks source link

Interface mismatch between Proxy and Stub on Huawei Mate 20 #17

Closed samrakchan closed 1 month ago

samrakchan commented 5 months ago

Even though I'm employing the same interface for both client and server, I encounter the following error on Huawei phones: java.lang.RuntimeException: Interface mismatch between Proxy and Stub 64 [63]. Use the same interface for both client and server. Remarkably, this error is exclusive to Huawei devices; the code runs smoothly on other devices.

samrakchan commented 3 months ago

Caused by: java.lang.IllegalArgumentException: Modifiers [PRIVATE] are not allowed on Kotlin parameters. Allowed modifiers: [VARARG, NOINLINE, CROSSINLINE] at com.squareup.kotlinpoet.ParameterSpec.(ParameterSpec.kt:41) at com.squareup.kotlinpoet.ParameterSpec.(ParameterSpec.kt:29) at com.squareup.kotlinpoet.ParameterSpec$Builder.build(ParameterSpec.kt:157) at remoter.compiler.kbuilder.KClassBuilder.generateProxy(KClassBuilder.kt:47) at remoter.compiler.kbuilder.KBindingManager.generateProxy(KBindingManager.kt:95) at remoter.compiler.RemoterProcessor.process(RemoterProcessor.java:83) at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt:90) at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:209) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)

samrakchan commented 1 month ago

Hi @josesamuel,

I made some changes on my end and fixed the issue. Could you please upgrade all the dependencies and also bump the target API to 34 or 35?

Much appreciated.

Thank you, Samrakchan

josesamuel commented 1 month ago

javapoet / kotlinpoet updated

samrakchan commented 2 weeks ago

Thank you for the upgrade. After the upgrade, it works like a charm. Cheers.