Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Failing to build paho.mqtt.android properly

I'm not a Java developer (I'm a C#/C/C++ developer by trade), so this could be just a misunderstanding of the gradle build system, but I'm unable to successfully build this project (https://github.com/eclipse/paho.mqtt.android) for use on an android phone. I have found, what I believe to be, a bug and I'd like to tweak some of the source code to verify a fix. That's why I'm motivated to build. 

I'm running on Windows. I downloaded the Java 8 SDK/JDK, set up my JAVA_HOME environment variable, and then first attempted to run (per the instructions on the project's README) gradlew.bat clean assemble exportJar, but it failed. I found this issue: https://github.com/eclipse/paho.mqtt.android/issues/165, which then allowed me to build the JAR files by running gradlew.bat clean org.eclipse.paho.android.service:assemble org.eclipse.paho.android.service:publish. 

The problem I'm running into now is that when I attempt to use the JAR files in my Xamarin project, I get this:

java.util.MissingResourceException: Can't find bundle for base name org.eclipse.paho.client.mqttv3.internal.nls.logcat, locale en_US

Okay. So, I'm assuming I'm not building the project correctly because there appear to be missing resources. When I run jar tf org.eclipse.paho.client.mqttv3-1.1.0.jar, for example, and compare the results between the JAR file I've built and the one I got online, there are differences. So, something isn't coming together for me. I'm not building the libraries fully. 

There seem to be a lot of posts about this (https://www.eclipse.org/forums/index.php/t/1077611/https://github.com/eclipse/paho.mqtt.android/issues/369https://stackoverflow.com/questions/44164397/spring-mqtt-java-util-missingresourceexception-cant-find-bundle-for-base-name), but none seem to come to a resolution (that I can understand, at least), and I'm afraid I'm not really knowledgeable enough in Java development to piece together a fix. Since others appear to have had issues with it, I thought I'd cut to the chase and pose the question to you all. 

Are the instructions out of date in the README? Are the gradle files out of date? Am I missing something fundamental? 

Back to the top