SimpleBLE icon indicating copy to clipboard operation
SimpleBLE copied to clipboard

Android build errors

Open petabyt opened this issue 1 year ago • 0 comments

C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/src/backends/android/PeripheralBase.cpp:114:12: error: no matching constructor for initialization of 'SimpleBLE::ByteArray' (aka 'kvn::bytearray')
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:37:5: note: candidate constructor not viable: no known conversion from 'std::vector<unsigned char>::iterator' (aka '__wrap_iter<unsigned char *>') to 'const uint8_t *' (aka 'const unsigned char *') for 1st argument
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:50:5: note: candidate constructor not viable: no known conversion from 'std::vector<unsigned char>::iterator' (aka '__wrap_iter<unsigned char *>') to 'const char *' for 1st argument
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:30:5: note: candidate constructor not viable: requires single argument 'vec', but 2 arguments were provided
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:43:5: note: candidate constructor not viable: requires single argument 'byteArr', but 2 arguments were provided
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:56:5: note: candidate constructor not viable: requires single argument 'byteArr', but 2 arguments were provided
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:19:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:19:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
C:/Users/brikb/AndroidStudioProjects/fudge/third_party/SimpleBLE/simpleble/../external/include\external/kvn_bytearray.h:24:5: note: candidate constructor not viable: requires 0 arguments, but 2 were provided

I added an extra constructor: bytearray(std::vector<unsigned char>::iterator ptr, std::vector<unsigned char>::iterator size) : data_(ptr, size) {}

And... I don't have nativehelper. I don't know where/how you got it for the NDK.

petabyt avatar Sep 19 '24 06:09 petabyt