I would like to use an Android client as a Kafka Producer. When I try to send a record to the topic I\'m getting following error:
Didn\'t find class \"java.l
That API is not a part of Android, and is not compatible with Android. The java.lang.management API is for managing and monitoring the Java VM. Android's Dalvik VM is not a Java VM.
I'm actually not sure it's possible to use Kafka as a producer on Android (see for instance, this question, not answered at the moment of writing), because of the dependencies involved. So, someone might have ported Kafka to Android but I don't know that.
I could suggest a simple alternative: REST service that posts data to Kafka, and Android App will just call this service.