android,ClassNotFoundException

<divclass08-2822:48:42.112:D/AndroidRuntime(1324):ShuttingdownVM

08-2822:48:42.112:W/dalvikvm(1324):threadid=1:threadexitingwithuncaughtexception(group=0xa4d46b20)

08-2822:48:42.112:E/AndroidRuntime(1324):FATALEXCEPTION:main

08-2822:48:42.112:E/AndroidRuntime(1324):Process:com.hj.post.tscale,PID:1324

08-2822:48:42.112:E/AndroidRuntime(1324):java.lang.RuntimeException:Unabletoinstantiateapplicationcom.hj.post.tscale.ErpPostApplication:java.lang.ClassNotFoundException:Didn'tfindclass"com.hj.post.tscale.ErpPostApplication"onpath:DexPathList[[directory"."],nativeLibraryDirectories=[/system/lib]]

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.app.LoadedApk.makeApplication(LoadedApk.java:507)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.app.ActivityThread.access$1500(ActivityThread.java:135)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.os.Handler.dispatchMessage(Handler.java:102)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.os.Looper.loop(Looper.java:136)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.app.ActivityThread.main(ActivityThread.java:5001)

08-2822:48:42.112:E/AndroidRuntime(1324):atjava.lang.reflect.Method.invokeNative(NativeMethod)

08-2822:48:42.112:E/AndroidRuntime(1324):atjava.lang.reflect.Method.invoke(Method.java:515)

08-2822:48:42.112:E/AndroidRuntime(1324):atcom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

08-2822:48:42.112:E/AndroidRuntime(1324):atcom.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)

08-2822:48:42.112:E/AndroidRuntime(1324):atdalvik.system.NativeStart.main(NativeMethod)

08-2822:48:42.112:E/AndroidRuntime(1324):Causedby:java.lang.ClassNotFoundException:Didn'tfindclass"com.hj.post.tscale.ErpPostApplication"onpath:DexPathList[[directory"."],nativeLibraryDirectories=[/system/lib]]

08-2822:48:42.112:E/AndroidRuntime(1324):atdalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

08-2822:48:42.112:E/AndroidRuntime(1324):atjava.lang.ClassLoader.loadClass(ClassLoader.java:497)

08-2822:48:42.112:E/AndroidRuntime(1324):atjava.lang.ClassLoader.loadClass(ClassLoader.java:457)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.app.Instrumentation.newApplication(Instrumentation.java:975)

08-2822:48:42.112:E/AndroidRuntime(1324):atandroid.app.LoadedApk.makeApplication(LoadedApk.java:502)

08-2822:48:42.112:E/AndroidRuntime(1324):...11more

上周做项目的时候遇到ClassNotFoundException,经过漫长的探究,有的同行说引用的jar包启用且移动到顶部,但是试了,没有用,最终发现时Manifest中application中hashCode为true导致

gotaClassNotFoundExceptiononmakeandroidprojectlastweek,atendoflongsearch,somebodysaythejarlibaryshouldbetoponthebuildpath,butnotwork,atlastfoundreason,becausethehashCodetaginapplicationinmainfestisfalse

相关推荐