在运行Android 4.4.4(API 19)的真实设备上部署和运行Android应用程序时,我遇到了这个奇怪的错误。 最近我安装了Windows 8.1 Pro,Android Studio 8.14,Java 1.7.0_67 x64。在此之前,在Windows 7机器上一切正常。
堆栈跟踪:
main@830030777992, prio=5, in group 'main', status: 'RUNNING'
at libcore.io.ForwardingOs.stat(ForwardingOs.java:131)
at dalvik.system.DexPathList.splitAndAdd(DexPathList.java:193)
at dalvik.system.DexPathList.splitPaths(DexPathList.java:177)
at dalvik.system.DexPathList.splitLibraryPath(DexPathList.java:160)
at dalvik.system.DexPathList.<init>(DexPathList.java:120)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:57)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:327)
at android.app.LoadedApk.makeApplication(LoadedApk.java:513)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4435)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Method.java:-1)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
at dalvik.system.NativeStart.main(NativeStart.java:-1)
这些是可用的运行时变量:
this = {libcore.io.BlockGuardOs@830030803952}
os = {libcore.io.Posix@830030808968}
Exception = {libcore.io.ErrnoException@830055892600}
functionName = {java.lang.String@830055892526}"stat"
errno = 2
cause = {libcore.io.ErrnoException@830055892600}"libcore.io.ErrnoException: stat failed: ENOENT (No such file or directory)"
dataMessage = null
stackState = {int[44]@83005589640}
stackTrace = {java.lang.StackTraceElement[0]@830030771936}
suppressedExceptions = {java.util.Collections$EmptyList@8300307698166} size = 0
据我所知,应用程序甚至没有启动。试图多次卸载并重新部署应用程序 - 没有成功。
任何帮助和建议都将不胜感激。
更新16.11.2014
我刚刚在模拟器上运行该应用程序并且工作正常,但它仍然无法在我的手机上启动。卸载,重新启动恢复,清除Dalvik缓存,重新部署 - 没有帮助
更新19.11.2014
我失去了耐心并降级到Windows 7。 在第一次部署Android工作室让我卸载应用程序,我同意,现在它工作正常。运行日志如下(可能对某人有帮助)
Installing com.ash.challenge
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.maypackage"
pkg: /data/local/tmp/com.maypackage
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
DEVICE SHELL COMMAND: pm uninstall com.maypackage
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.maypackage"
pkg: /data/local/tmp/com.maypackage
Success