ApplicationClass ClassNotFoundException

时间:2014-12-22 00:57:52

标签: java android classnotfoundexception

我正在使用应用程序类,所以我必须创建清单文件,如下所示:

<application
    android.name="com.moonae.android.common.ApplicationClass"
    android.icon="@drawble/ic_launcher"
    android.largeHeap="true"
    ....>
<activity..../> 

我必须在测试时正常工作,通常是Google Play商店错误报告中发生的错误。 但错误报告发布在Android 4.4版本上,我甚至在4.4测试正常运行。 如果遇到此问题的人帮助我。

java.lang.RuntimeException: Unable to instantiate application com.moonae.android.common.ApplicationClass: java.lang.ClassNotFoundException: Didn't find class "com.culturelandnew.android.common.ApplicationClass" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4524)
at android.app.ActivityThread.access$1500(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5335)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.moonae.android.common.ApplicationClass" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:993)
at android.app.LoadedApk.makeApplication(LoadedApk.java:511)
... 11 more

1 个答案:

答案 0 :(得分:3)

<application
   android.name="com.moonae.android.common.ApplicationClass"
   android.icon="@drawble/ic_launcher"
   android.largeHeap="true"
   ....>
<activity..../> 
这是一个错字吗?在我说android.nameandroid:name之前我还没有看到这个.btw

快速建议,删除你的应用程序标签,并使用eclipse gui端搜索应用程序类并引用它..大多数它引用它而不包括包名..像这样.. =&gt;

<application
 android:name="ApplicationClass"
 android:icon="@drawble/ic_launcher"
 android:largeHeap="true"
 ....>