我正在开发使用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
答案 0 :(得分:0)
任何合理的评论都会受到欢迎。 Joe Cullity