Skip to content

Android lambda exceptions for client #246

Closed

Description

@hakangs

Expected behavior

I have an android app, in which I have added Pulsar Client with gradle. It compiles fine with these additional settings in build.gradle file:

jackOptions {
    enabled true
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Actual behavior

But when I run the app, I get the following exceptions and it fails:

Error:ChannelManager.java:363-364: Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.netty.util.concurrent.GenericFutureListener
Error:NettyReactiveStreamsBody.java:113-114: Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable
Error:AsyncHttpClientConfigHelper.java:65-66: Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.util.function.Function
Error:AsyncHttpClientConfigDefaults.java:86-87: Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.util.function.IntFunction

How can we reproduce the issue

Can it be because Android does not accept lambdas by default ? How can I achieve Pulsar Client to run in Android ?

Is there a 1.7 version compiled version of client jars ?

System configuration

Pulsar version: 1.16

Activity

  1. agarman commented on Feb 26, 2017

    @agarman

    Have you considered using the WebSocket client?

    It'll be simpler than getting a bunch of Java 8 libraries to work (stably) in Dalvik.

  2. sijie commented on Aug 22, 2018

    @sijie
    Member

    the minimal requirement for java is java8. and there is a websocket proxy, so you can use websocket api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions