I work with an internal sdk that I developed, and I communicate between the application and the sdk through an interface defined as keep.
So far everything has worked well as it should.
And from the moment I upgraded to 8.4
<code> classpath 'com.android.tools.build:gradle:8.4.0'
</code>
<code> classpath 'com.android.tools.build:gradle:8.4.0'
</code>
classpath 'com.android.tools.build:gradle:8.4.0'
While running, the compiler does not recognize the interface for me and throws an error like this:
<code> java.lang.NoClassDefFoundError: Failed resolution of:
ControllerInterface$DefaultImpls;
</code>
<code> java.lang.NoClassDefFoundError: Failed resolution of:
ControllerInterface$DefaultImpls;
</code>
java.lang.NoClassDefFoundError: Failed resolution of:
ControllerInterface$DefaultImpls;
Anyone have an idea why? And how can it be solved?
this is my interface :
<code>@Keep
object Controller : ControllerInterface {
override fun connect(callback:ControllerCallback?) {
InternalController.setRobotControllerCallback(callback)
}
}
</code>
<code>@Keep
object Controller : ControllerInterface {
override fun connect(callback:ControllerCallback?) {
InternalController.setRobotControllerCallback(callback)
}
}
</code>
@Keep
object Controller : ControllerInterface {
override fun connect(callback:ControllerCallback?) {
InternalController.setRobotControllerCallback(callback)
}
}
and this is the code from app:
<code> Controller.connect(
object : ConnectionCallback {
override fun connectionComplete(
isConnect: Boolean,
status: Map<String, String>?,
Dict: Map<String, Any?>?
) {
})
</code>
<code> Controller.connect(
object : ConnectionCallback {
override fun connectionComplete(
isConnect: Boolean,
status: Map<String, String>?,
Dict: Map<String, Any?>?
) {
})
</code>
Controller.connect(
object : ConnectionCallback {
override fun connectionComplete(
isConnect: Boolean,
status: Map<String, String>?,
Dict: Map<String, Any?>?
) {
})