运行之前Android程序崩溃。编译为Debug

时间:2016-07-22 23:41:18

标签: android-studio-2.1

我正在开发使用Android Studio的程序,该程序在正常APK运行时按预期运行,但如果我将其编译为调试,则在第一行代码执行之前崩溃,因此设置制动点我执行代码的第一行,从不跳过。

我已经     从测试目标中完全删除程序(nexus 7)     关闭平板电脑,然后重新启动平板电脑     关闭/重新启动开发机器     清理了这个项目     重建项目。 在没有调试的情况下编译/运行时程序仍按预期运行。 加载后崩溃,但在调试时编译/运行之前运行。

欢迎任何关于如何尝试和克服这个问题的想法。   Android Studio 2.1.2   compileSdkVersion 21   buildToolsVersion" 21.1.2

崩溃后异常变量的复制

shadow $ klass = {Class @ 613}" class java.lang.Class"

superClass = {Class @ 1356}" class java.lang.Exception"

2 = {ArtMethod @ 3613}

17 = {ArtMethod @ 3628}

numReferenceStaticFields = 0

verifyErrorClass = null

iFields = {ArtField [2] @ 3636}

stackState = {Object [22] @ 3602}

3 = {ArtMethod @ 3614}

0 = {ArtMethod @ 3611}

errno = 2

classLoader = null

8 = {ArtMethod @ 3619}

dexCache = {DexCache @ 3633}

functionName =" stat"

virtualMethods = {ArtMethod [3] @ 3639}

影子$ 监视器 = -1294973706

primitiveType = 0

异常= {ErrnoException @ 3590}

16 = {ArtMethod @ 3627}

value = {char [4] @ 3607}

ifTable = {Object [2] @ 3637}

vtable = null

4 = {ArtMethod @ 3615}

suppressExceptions = {Collections $ EmptyList @ 3604} size = 0

classSize = 468

functionName =" stat"

6 = {ArtMethod @ 3617}

errno = 2   hashCode = 3540564

referenceStaticOffsets = 0

1 = {ArtMethod @ 3612}

13 = {ArtMethod @ 3624}

detailMessage = null

18 = {ArtMethod @ 3629}

stackTrace = {StackTraceElement [0] @ 3603}

sFields = null

dexClassDefIndex = 4

componentType = null

15 = {ArtMethod @ 3626}

status = 10

10 = {ArtMethod @ 3621}

shadow $ klass = {Class @ 3428}" class java.lang.String"

shadow $ klass = {Class @ 183}" class android.system.ErrnoException"

19 = {ArtMethod @ 3630}

12 = {ArtMethod @ 3623}

5 = {ArtMethod @ 3616}

referenceInstanceOffsets = -1090519040

cause = {ErrnoException @ 3590}" android.system.ErrnoException:stat failed:ENOENT(没有这样的文件或目录)"

suppressExceptions = {Collections $ EmptyList @ 3604} size = 0

objectSize = 36

detailMessage = null

shadow $ klass = {Class @ 183}" class android.system.ErrnoException"

dexCacheStrings = {String [23663] @ 3634}

dexTypeIndex = 6

影子$ 监视器 = -1665173294

offset = 0

14 = {ArtMethod @ 3625}

numReferenceInstanceFields = 1

变量调试信息不​​可用

21 = {int [21] @ 3632}

name =" android.system.ErrnoException"

stackState = {Object [22] @ 3602}

clinitThreadId = 456

directMethods = {ArtMethod [2] @ 3635}

7 = {ArtMethod @ 3618}

20 = {ArtMethod @ 3631}

9 = {ArtMethod @ 3620}

11 = {ArtMethod @ 3622}

count = 4

shadow $ monitor = -1353303322

cause = {ErrnoException @ 3590}" android.system.ErrnoException:stat failed: ENOENT(没有这样的文件或目录)"

stackTrace = {StackTraceElement [0] @ 3603}

accessFlags = 524305

1 个答案:

答案 0 :(得分:0)

好吧,我自己解决了这个问题。不是以我想解决的方式,或以任何方式解释导致问题的原因,但问题得到纠正。 - 我已经在IT中足够长时间知道你需要做备份了,一旦我记得我有它们,我在问题浮出水面之前拉了一天的备份,在项目停留时恢复整个目录树和PUFF一切顺利。重新应用我在备份后的第二天所做的任何代码更改(我保留了很好的关于更改的纸质笔记)然后我去了。

- 但是 -

这并不能解释为什么系统工作一天,睡了一夜后,系统第二天就不能工作了。我仍然不知道收到错误消息的人如果他/她没有一套好的备份就会调试/解决问题。

另外 - 似乎有人降级了我的问题。也许它确实应该被降级,但我不知道为什么它被降级。这个问题对我来说似乎很合理。傍晚一天晚上,系统工作,第二天它没有,系统提供的信息发布在问题中。

如果有人能向我解释一个人如何从发布的日志中提取信息,找出问题的原因,或者至少解释为什么这个问题不恰当而无法保证降级,我会感到非常高兴。 ?

任何合理的评论都会受到欢迎。 Joe Cullity

相关问题