I've just ran into the following build errors using Gradle 7.1.1 and WatermelonDB@0.23.0:
ProjectRoot/node_modules/@nozbe/watermelondb/native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp:71:5: error: use of undeclared identifier 'assert'
assert(env);
^
ProjectRoot/node_modules/@nozbe/watermelondb/native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp:76:5: error: use of undeclared identifier 'assert'
assert(jvm);
^
ProjectRoot/node_modules/@nozbe/watermelondb/native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp:81:5: error: use of undeclared identifier 'assert'
assert(jvm);
^
ProjectRoot/node_modules/@nozbe/watermelondb/native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp:85:5: error: use of undeclared identifier 'assert'
assert(env);
^
4 errors generated.
And I was able to fix it by adding
#include <cassert>
To the top of /native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp
It's probably related to my local environment, but posting here just in case it helps someone else. Is there any downside to adding that #include statement to the project file? If not it seems like an easy fix ...
https://github.com/Nozbe/WatermelonDB/blob/06607aebfdb33ab1a07728e009cb53ceca82dd75/native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp#L75
I've just ran into the following build errors using Gradle 7.1.1 and WatermelonDB@0.23.0:
And I was able to fix it by adding
#include <cassert>
To the top of
/native/android-jsi/src/main/cpp/DatabasePlatformAndroid.cpp
It's probably related to my local environment, but posting here just in case it helps someone else. Is there any downside to adding that
#include
statement to the project file? If not it seems like an easy fix ...