# Java XBee Library and android.content.Context error

**URL:** <https://forums.digi.com/t/java-xbee-library-and-android-content-context-error/18664>\
**Category:** XBee Programamble (S2C & 900 HP)\
**Tags:** java, java-library, java-xbee-library\
**Created:** [August 22, 2017, 3:26pm UTC](https://forums.digi.com/t/java-xbee-library-and-android-content-context-error/18664 "2017-08-22T15:26:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richdionne](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@richdionne](https://forums.digi.com/u/richdionne)\
**Post date:** [August 22, 2017, 3:26pm UTC](https://forums.digi.com/t/java-xbee-library-and-android-content-context-error/18664/1 "2017-08-22T15:26:46Z")

</div>

Hello,

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?

---

<div class="post-metadata">

**Author:** ![mateo896](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mateo896](https://forums.digi.com/u/mateo896)\
**Post date:** [January 25, 2018, 9:32am UTC](https://forums.digi.com/t/java-xbee-library-and-android-content-context-error/18664/2 "2018-01-25T09:32:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hussainrizvi](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hussainrizvi](https://forums.digi.com/u/hussainrizvi)\
**Post date:** [January 14, 2019, 4:26pm UTC](https://forums.digi.com/t/java-xbee-library-and-android-content-context-error/18664/3 "2019-01-14T16:26:50Z")

</div>

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