Consensys / jblst

MIT License
8 stars 12 forks source link

Error in loading JBlst (Android) #19

Open joyosive opened 2 years ago

joyosive commented 2 years ago

UsingJBlst.loadNativeLibrary(); shows cannot resolve symbol Jblst.

Trying to use jblst in my Android app. I took the dependency from & added it to app level build.gradlel file.

Without loading the native library, following error comes up -

 java.lang.UnsatisfiedLinkError: No implementation found for long tech.pegasys.teku.bls.impl.blst.swig.blstJNI.new_scalar() (tried Java_tech_pegasys_teku_bls_impl_blst_swig_blstJNI_new_1scalar and Java_tech_pegasys_teku_bls_impl_blst_swig_blstJNI_new_1scalar__)
at tech.pegasys.teku.bls.impl.blst.swig.blstJNI.new_scalar(Native Method)
ajsutton commented 2 years ago

I suspect there isn't a native binary built that can support Android or there's some other limitation in Android about what native libraries can be used (and how to load them). Unfortunately I'm not an Android dev so am not aware of the details there. Certainly happy to take pull requests to adjust the build process here if that's what's required - the library loading details are straight from the blst project but I'm sure they'd be happy to accept PRs to add Android support as well.