Recently, I'm trying to use V8 in my Android app with libv8_monolith.a.
I buillt it on Ubuntu on WSL successfly. I use it in my app with set up code below.
```
using namespace v8;
Isolate* isolate_;
Global<Context> context_;
Isolate::CreateParams create_params;
std::unique_ptr<Platform> platform_;
void initV8()
{
V8::InitializeICU();
platform_ = v8::platform::NewDefaultPlatform();
V8::InitializePlatform(platform_.get());
V8::Initialize(); // Here will crash!
}
extern "C" JNIEXPORT jstring JNICALL
Java_com_edo_v8api_MainActivity_stringFromJNI(
JNIEnv* env,
jobject /* this */) {
std::string hello = "Hello from C++";
initV8();
return env->NewStringUTF(hello.c_str());
}
```
Then, I got below error.
-----------------------------------------------------------------------------------------------
A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 27338 (com.edo.v8api), pid 27338 (com.edo.v8api)
-----------------------------------------------------------------------------------------------
I'm not sure why this error was occurred. Should I do more but I put v8_monolith.a into the Android project? I imported libv8_monolith.a only.