自定义AOSP键盘错误:DictionaryProvider ClassNotFoundException [英] Custom AOSP Keyboard Error: DictionaryProvider ClassNotFoundException

查看:188
本文介绍了自定义AOSP键盘错误:DictionaryProvider ClassNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在添加一些自定义代码以获得按键触摸的压力值之后,我尝试从5.0.2分支构建AOSP键盘.添加更改后,我将使用lunch full-eng构建源,并使用mm构建LatinIME.

I'm trying to build the AOSP keyboard from the 5.0.2 branch after adding some custom code to obtain pressure values for key touches. I'm using lunch full-eng to build the source and using mm to build LatinIME after I've added my changes.

然后,在删除旧版本后,我将LatinIME推到我的Galaxy S3上的/system/apps/上.我正在设备上运行CM12 5.0.2的非官方版本.

I'm then pushing LatinIME to /system/apps/ on my Galaxy S3 after removing the previous version. I'm running an unofficial version of CM12 5.0.2 on the device.

下面出现的错误与我的代码更改无关,但更可能与我构建应用程序的方式有关.

The error I get is below which appears to have nothing to do with my code changes but more likely in the way I'm building the app.

E/AndroidRuntime(12198): FATAL EXCEPTION: main
E/AndroidRuntime(12198): Process: com.android.inputmethod.latin, PID: 12198
E/AndroidRuntime(12198): java.lang.RuntimeException: Unable to get provider com.android.inputmethod.dictionarypack.DictionaryProvider: java.lang.ClassNotFoundException: Didn't find class "com.android.inputmethod.dictionarypack.DictionaryProvider" on path: DexPathList[[zip file "/system/app/LatinIME.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/AndroidRuntime(12198):    at android.app.ActivityThread.installProvider(ActivityThread.java:4969)
E/AndroidRuntime(12198):    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4561)
E/AndroidRuntime(12198):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4501)
E/AndroidRuntime(12198):    at android.app.ActivityThread.access$1500(ActivityThread.java:144)
E/AndroidRuntime(12198):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
E/AndroidRuntime(12198):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(12198):    at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(12198):    at android.app.ActivityThread.main(ActivityThread.java:5223)
E/AndroidRuntime(12198):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(12198):    at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(12198):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
E/AndroidRuntime(12198):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
E/AndroidRuntime(12198): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.inputmethod.dictionarypack.DictionaryProvider" on path: DexPathList[[zip file "/system/app/LatinIME.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
E/AndroidRuntime(12198):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime(12198):    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(12198):    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
E/AndroidRuntime(12198):    at android.app.ActivityThread.installProvider(ActivityThread.java:4954)
E/AndroidRuntime(12198):    ... 11 more
E/AndroidRuntime(12198):    Suppressed: java.lang.ClassNotFoundException: com.android.inputmethod.dictionarypack.DictionaryProvider
E/AndroidRuntime(12198):        at java.lang.Class.classForName(Native Method)
E/AndroidRuntime(12198):        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
E/AndroidRuntime(12198):        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
E/AndroidRuntime(12198):        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
E/AndroidRuntime(12198):        ... 13 more
E/AndroidRuntime(12198):    Caused by: java.lang.NoClassDefFoundError:     Class not found using the boot class loader; no stack available

我是编译Android源代码的新手,所以也许这很明显,但是我应该为我的特定设备构建而不是使用lunch full-eng吗?

I'm new to compiling Android source, so perhaps this is obvious, but should I be building for my specific device instead of using lunch full-eng?

在此问题上的任何帮助将不胜感激.

Any help on this issue would be greatly appreciate.

推荐答案

在构建平台应用程序时,大多数应用程序都是经过预先优化的.通过添加 WITH_DEXPREOPT:= false ,它将在内部创建一个带有dex文件的apk.

When building platforms apps, most of them are pre-optimized. By adding WITH_DEXPREOPT := false it will build the apk with a dex file inside.

验证要推送到设备的LatinIME.apk中是否包含classes.dex文件(解压缩-l).如果没有,请将 WITH_DEXPREOPT 添加到LatinIME的 Android.mk 文件中.

Verify the LatinIME.apk you are pushing to your device has a classes.dex file in it (unzip -l). If it does not, add the WITH_DEXPREOPT to the Android.mk file for LatinIME.

这篇关于自定义AOSP键盘错误:DictionaryProvider ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆