首先调查到原因是:libjni_pinyinime.so已生成在“¥OUT/obj/SHARED_LIBRARIES/”下,但没有打包到system.img中。
解决这个问题的方法是:在Andriod.mk指定依赖关系,指定PinyinIME.apk依赖于libjni_pinyinime.so。
在packages/inputmethods/PinyinIME/Android.mk中添加:
LOCAL_REQUIRED_MODULES := libjni_pinyinime
解决了以上问题后,在eng版本中Google输入法可以使用了,但在userdebug版本中仍然会crash。
LOCAL_REQUIRED_MODULES
LOCAL_REQUIRED_MODULES
Set LOCAL_REQUIRED_MODULES to any number of whitespace-separated module names, like "libblah" or "Email". If this module is installed, all of the modules that it requires will be installed as well. This can be used to, e.g., ensure that necessary shared libraries or providers are installed when a given app is installed. |