google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.82k stars 1.89k forks source link

error: undefined reference to 'filament::JNI_OnLoad(_JavaVM*, void*)' #1983

Closed dilemmacc closed 4 years ago

dilemmacc commented 4 years ago

android/filament-android/src/main/cpp/Filament.cpp:38: error: undefined reference to 'filament::JNI_OnLoad(_JavaVM, void)'

prideout commented 4 years ago

Can we have a few more details? Are you using our build.sh script, are you building from a Mac or Windows, etc.

dilemmacc commented 4 years ago

Can we have a few more details? Are you using our build.sh script, are you building from a Mac or Windows, etc.

ok, and thx. I built from a Mac. filament build version is 1.4.3. use your public build.sh script

dilemmacc commented 4 years ago

If I wanna to build an android sample apk, do I have to build my "out" folder? Can I use aar included to build it?

romainguy commented 4 years ago

You can use the included AARs if you match the versions. It looks like you tried to build Filament's JNI library without building Filament itself first (use build.sh -i -p desktop,android release to build everything together).