Metawear SDK / Android compatibility: min-sdk-version >= 26

I have been trying to write a cordova plug-in for our app.  Per your recommendation the metawear sdk is included by including it in the Gradle build.  However while a static build produces no error, any attempt to run on a device yields the following erro

Error:Uncaught translation error: com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

The challenge seems to be that the Metawear SDK is using Java 8 features (lambda functions) that are not compatible with anything less than android sdk 26 (the moment the android market share for sdk 25 and _lower_ is about 99% as of July 2017).  I have tried enabling 'jack' in android but the build throws errors of which this one is representative:

AGPBI: {"kind":"error","text":"Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.Runnable","sources":[{"file":"C:\\Users\\Mike\\Documents\\Code\\workshop\\platforms\\android\\AccelerometerBmi160Impl.java","position":{"startLine":164,"endLine":165}}]}

My questions are:
  • is there a current Metawear SDK available that doesn't use Java 8 features or that is compatible with android sdk 25 and lower?
  • have you faced this issue and have a recommended workaround?
As always, TIA for any guidance.

Comments

This discussion has been closed.