android-studio - 我可以在错误中找到更多信息吗?

标签 android-studio error-handling

我没有找到问题,我可以在错误中看到它的位置,还是可以找到附近的信息,而不仅仅是Integer cannot be cast to java.lang.String

3485-3485/com.example.tobias.uebung1 E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.example.tobias.uebung1, PID: 3485
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tobias.uebung1/com.example.tobias.uebung1.main}: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
            at android.app.ActivityThread.-wrap11(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
            at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:225)
            at com.example.tobias.uebung1.main.Main(main.java:440)
            at com.example.tobias.uebung1.main.onCreate(main.java:106)
            at android.app.Activity.performCreate(Activity.java:6237)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
            at android.app.ActivityThread.-wrap11(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

最佳答案

我不知道我们应该如何提供帮助,但是我认为您现在可以做的最好的事情就是添加一些断点并对其进行调试。或者,您可以发布代码,以便我们提供帮助。

关于android-studio - 我可以在错误中找到更多信息吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32801946/

相关文章:

Android Studio 无法撤消

android - 如何在 NDK 原生代码中获取断点并在 Android Studio 中调试原生代码?

php - Yii2 错误处理程序在非对象调用时死得很丑

java - 列位置 '0' 超出范围。此 ResultSet 的列数为 '3'

android - 错误捕获错误

android - 支持从 Android N (--min-api 24) : okhttp3. Request okhttp3.Authenticator 开始

android - 进程系统在 Android 设备模拟器上没有响应

java - 问 : How to set variable which use for if condition

python - 在远程 shell 中使用 Fabric to run() 调用时,我可以捕获错误代码吗?

error-handling - 方案:Why am i getting this error -assertion-violation: argument of wrong type [car] (car '())