MangoAutomation / BACnet4J

BACnet/IP stack written in Java. Forked from http://sourceforge.net/projects/bacnet4j/
GNU General Public License v3.0
187 stars 111 forks source link

BACnet4j-5.0.0.jar with JAVA 8 is not supported in Android 7.0 #42

Closed SureshKumarSelvaraj closed 5 years ago

SureshKumarSelvaraj commented 5 years ago

I am Using BACnet4j-5.0.0.jar in my android application to create bacnet objects in my android app.

To Reproduce Steps to reproduce the behavior:

  1. Add BACnet4j-5.0.0.jar as library in android project
  2. RUN in android 7.0 device
  3. Getting Run time error "java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;"

Android 7.0 is not supporting all the features of JAVA 8. Supports only the following Lambda expressions Method references Type annotations Default and static interface methods Repeating annotations

Java.time is not supported by android 7.0.

Suggest me some solution to make BACnet4j-5.0.0.jar compatible with android 7.0.

Thanks.

terrypacker commented 5 years ago

This would not be easy.

  1. You could fork our repo and replace all references to java.time with whatever is supported on Android 7.0

  2. Go back and see when in the history of BACnet4J was released for Java 7 or Java 6

fozhao commented 3 years ago

The release support Java 7 doesn't support protocol revision 14 or later. It's too old a revision to be honest. Latest BTL certification recommend at least revision 14. It makes this repo almost useless on old Android device.