构建android LatinIME JNI

时间:2014-10-12 18:22:47

标签: android java-native-interface

我可以成功构建android LatinIME。但是我在执行期间遇到了以下错误 “无法加载jni_latinime”

然后我意识到我需要构建本机源,我必须下载android NDK。我已经下载了最新的NDK(版本10b),当我尝试构建JNI源时,我遇到了(巨大的)错误列表。

23:33:44 **** Incremental Build of configuration Default for project TamilKeyboard ****
"C:\\android-ndk-r10b\\ndk-build.cmd" NDK_DEBUG=1 all 

C:\Users\nudayasankar\android\TamilKeyboard>rem This is a Windows cmd.exe script used to invoke the NDK-specific GNU Make executable 

C:\Users\nudayasankar\android\TamilKeyboard>call "C:\android-ndk-r10b\find-win-host.cmd" NDK_WIN_HOST 
[x86] Gdbserver      : [x86-4.6] libs/x86/gdbserver
[x86] Gdbsetup       : libs/x86/gdb.setup
[x86] Compile++      : jni_latinime_common_static ' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:284:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:284:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:284:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:286:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:286:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:286:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:286:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:288:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:288:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:288:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:288:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:290:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:290:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:290:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:290:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:292:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:292:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:292:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:292:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:295:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:295:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:295:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:295:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:296:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:296:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:296:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:296:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:297:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:297:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:297:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:297:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:298:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:298:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:298:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:298:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:299:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:299:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:299:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:299:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:300:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:300:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:300:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:300:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:303:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:303:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:303:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:303:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:304:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:304:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:304:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:304:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:307:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:307:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:307:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:307:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:308:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:308:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:308:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:308:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:311:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:311:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:311:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/type_traits.h:311:1: error: base class 'struct std::__type_traits_aux' has a non-virtual destructor [-Werror=effc++]
In file included from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.h:54:0,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_vector.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hash_map.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/hash_map:38,
                 from jni/src/utils/hash_map_compat.h:25,
                 from jni/src/suggest/core/layout/proximity_info_utils.h:26,
                 from jni/src/suggest/core/layout/proximity_info.h:22,
                 from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:24:
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h:53:8: error: base class 'struct std::input_iterator_tag' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h:54:8: error: base class 'struct std::forward_iterator_tag' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h:55:8: error: base class 'struct std::bidirectional_iterator_tag' has a non-virtual destructor [-Werror=effc++]
In file included from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.h:54:0,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_vector.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hash_map.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/hash_map:38,
                 from jni/src/utils/hash_map_compat.h:25,
                 from jni/src/suggest/core/layout/proximity_info_utils.h:26,
                 from jni/src/suggest/core/layout/proximity_info.h:22,
                 from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:24:
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h:269:8: error: base class 'struct std::iterator' has a non-virtual destructor [-Werror=effc++]
In file included from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.c:397:0,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.h:720,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_vector.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hash_map.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/hash_map:38,
                 from jni/src/utils/hash_map_compat.h:25,
                 from jni/src/suggest/core/layout/proximity_info_utils.h:26,
                 from jni/src/suggest/core/layout/proximity_info.h:22,
                 from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:24:
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator.h:245:24: error: postfix 'std::insert_iterator::_Self& std::insert_iterator::operator++(int)' should return 'std::insert_iterator' [-Werror=effc++]
In file included from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_vector.h:729:0,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hash_map.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/hash_map:38,
                 from jni/src/utils/hash_map_compat.h:25,
                 from jni/src/suggest/core/layout/proximity_info_utils.h:26,
                 from jni/src/suggest/core/layout/proximity_info.h:22,
                 from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:24:
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h: In instantiation of 'std::priv::_Bit_iter':
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h:309:17:   instantiated from here
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h:169:8: error: base class 'struct std::priv::_Bit_iterator_base' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h: In instantiation of 'std::priv::_Bit_iter':
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h:473:32:   instantiated from here
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h:169:8: error: base class 'struct std::priv::_Bit_iterator_base' has a non-virtual destructor [-Werror=effc++]
In file included from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.c:397:0,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.h:720,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_vector.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hash_map.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/hash_map:38,
                 from jni/src/utils/hash_map_compat.h:25,
                 from jni/src/suggest/core/layout/proximity_info_utils.h:26,
                 from jni/src/suggest/core/layout/proximity_info.h:22,
                 from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:24:
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator.h: In instantiation of 'std::reverse_iterator >':
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h:477:29:   instantiated from here
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator.h:47:7: error: base class 'struct std::iterator' has a non-virtual destructor [-Werror=effc++]
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator.h: In instantiation of 'std::reverse_iterator >':
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_bvector.h:478:41:   instantiated from here
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_iterator.h:47:7: error: base class 'struct std::iterator' has a non-virtual destructor [-Werror=effc++]
In file included from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.h:38:0,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hash_map.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/hash_map:38,
                 from jni/src/utils/hash_map_compat.h:25,
                 from jni/src/suggest/core/layout/proximity_info_utils.h:26,
                 from jni/src/suggest/core/layout/proximity_info.h:22,
                 from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:24:
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_slist.h:904:46: error: postfix 'std::insert_iterator >& std::insert_iterator >::operator++(int)' should return 'std::insert_iterator >' [-Werror=effc++]
In file included from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.c:33:0,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_algobase.h:720,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_vector.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hash_map.h:34,
                 from C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/hash_map:38,
                 from jni/src/utils/hash_map_compat.h:25,
                 from jni/src/suggest/core/layout/proximity_info_utils.h:26,
                 from jni/src/suggest/core/layout/proximity_info.h:22,
                 from jni/com_android_inputmethod_keyboard_ProximityInfo.cpp:24:
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_function_base.h: In instantiation of 'std::less':
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_hashtable.c:74:90:   instantiated from here
C:/android-ndk-r10b/sources/cxx-stl/stlport/stlport/stl/_function_base.h:70:8: error: base class 'struct std::binary_function' has a non-virtual destructor [-

truncating the errors due to 30000 character limit

我不确定最新的NDK源是否存在任何问题,或者我是否缺少任何配置。我可以在NDK下成功编译样本,例如hello-jni,...

如果有人知道如何解决这个问题,请告诉我。

提前致谢。

0 个答案:

没有答案