Java XBee Library and android.content.Context error


I’ve been developing a project in Java using the NetBeans IDE (8.2) and the Java XBee Library. I’ve been able to successfully run and test the application in the IDE without issue; however, when I try and compile a clean build for distribution, the following error is thrown:

“error: cannot access Context
XBeeDevice myDevice = new XBeeDevice(PORT, BAUD_RATE);
class file for android.content.Context not found”

Just to see if I was crazy, I went back and followed all of the tutorial steps for the “myFirstXbeeApp” in the documentation for the XBee Library, and had the same symptoms: it runs fine in the IDE, but attempts to compile for distribution fail with the same error.

Any thoughts or suggestions?

1 Like

I exactly the same problem. Anyone knows what to do?

I am also having same error. Please if any help can be provided in this regard