I would like to use the Android client as a producer of Kafka. When I try to post to a topic, I get the following error:
Did not find class "java.lang.management.ManagementFactory
in this line:
mProducer = new KafkaProducer(configProperties);
I am less than the limit for the number of methods:
Total methods in mobile-debug.apk: 52200 (79.65% used)
Total fields in mobile-debug.apk: 21143 (32.26% used)
What is the reason for this error?
By the way, I could not find a single example where the kafka maker was used on Android or iOS.Update 1
In addition to Boris Zibrov’s answer, no one seems to have ported it successfully. These threads are also 2 years old.
Update 2
ManagementFactory, . :
android java.lang.management API