Android build fails with undefined reference to vtable

I am converting my iOS AugmentedTheatreApp to android. I copied BasicApp android directory into AugmentedTheatreApp’s folder, replaced all BasicApp references with the references to my AugmentedTheatreApp in AndroidManifest.xml and in the build.gradle, and was able to compile the app.

However, the linking part fails with error: undefined reference to 'vtable for AugmentedTheatreApp.

What else should be fixed to create vtable reference for AugmentedTheatreApp?

Thanks.

All input files are considered out-of-date for incremental task ':app:cinderCompileDebugNdk'.
DEP CHANGED: /Users/eight/repos/cinder_0.9.0_mac/cinderbit/OneWayTheaterIos/src-android/AugmentedTheatreApp.cpp
DEP CHANGED: /Users/eight/repos/cinder_0.9.0_mac/blocks/ciAnimatedGif/src/ciAnimatedGif.cpp
DEP CHANGED: /Users/eight/repos/Cinder-Android/blocks/OSC/src/cinder/osc/Osc.cpp
DEP CHANGED: /Users/eight/repos/Cinder-Android/lib/android/android-19/armeabi-v7a/libcinder_d.a
DEP CHANGED: /Users/eight/repos/Cinder-Android/lib/android/android-19/armeabi-v7a/libboost_filesystem.a
DEP CHANGED: /Users/eight/repos/Cinder-Android/lib/android/android-19/armeabi-v7a/libboost_system.a
Starting process 'command '/Users/eight/Library/Android/sdk/ndk-bundle/ndk-build''. Working directory: /Users/eight/repos/cinder_0.9.0_mac/cinderbit/OneWayTheaterIos/androidstudio/OneWayTheaterIos/app/build/cinder-ndk/debug Command: /Users/eight/Library/Android/sdk/ndk-bundle/ndk-build --jobs=8 NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/eight/repos/cinder_0.9.0_mac/cinderbit/OneWayTheaterIos/androidstudio/OneWayTheaterIos/app/build/cinder-ndk/debug/Android.mk APP_PLATFORM=android-19 NDK_OUT=/Users/eight/repos/cinder_0.9.0_mac/cinderbit/OneWayTheaterIos/androidstudio/OneWayTheaterIos/app/build/cinder-ndk/debug/obj NDK_LIBS_OUT=/Users/eight/repos/cinder_0.9.0_mac/cinderbit/OneWayTheaterIos/androidstudio/OneWayTheaterIos/app/src/main/jniLibs APP_STL=gnustl_static APP_ABI=armeabi-v7a NDK_TOOLCHAIN_VERSION=4.9 APP_CPPFLAGS=-I. APP_OPTIM=debug
Successfully started process 'command '/Users/eight/Library/Android/sdk/ndk-bundle/ndk-build''
[armeabi-v7a] Compile++ thumb: AugmentedTheatreApp <= AugmentedTheatreApp.cpp
[armeabi-v7a] Compile++ thumb: AugmentedTheatreApp <= ciAnimatedGif.cpp
[armeabi-v7a] Compile++ thumb: AugmentedTheatreApp <= Osc.cpp
[armeabi-v7a] SharedLibrary  : libAugmentedTheatreApp.so

/Users/eight/repos/cinder_0.9.0_mac/cinderbit/OneWayTheaterIos/androidstudio/OneWayTheaterIos/app/build/cinder-ndk/debug/../../../../../../src-android/AugmentedTheatreApp.h:44: error: undefined reference to 'vtable for AugmentedTheatreApp'
/Users/eight/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function (see go/missingkeymethod)
collect2: error: ld returned 1 exit status
make: *** [/Users/eight/repos/cinder_0.9.0_mac/cinderbit/OneWayTheaterIos/androidstudio/OneWayTheaterIos/app/build/cinder-ndk/debug/obj/local/armeabi-v7a/libAugmentedTheatreApp.so] Error 1

:app:cinderCompileDebugNdk FAILED
:app:cinderCompileDebugNdk (Thread[Daemon worker Thread 3,5,main]) completed. Took 29.552 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:cinderCompileDebugNdk'.
> Process 'command '/Users/eight/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 32.881 secs
Stopped 0 compiler daemon(s).

It turns out one the methods left from the iOS version was declared, but not implemented in the Android version. In c++ world the linker would point me to the specific method missing, but Android seems to only complain about the whole class.

–8