2012-05-02 62 views
1

我剛剛在開發者控制檯收到最爲奇妙的堆棧跟蹤。讓我感到困惑的是「MArcos」來自哪裏?這是應用程序:https://play.google.com/store/apps/details?id=genius.mohammad.accelerometer.mouse特殊的android RuntimeException

嘗試重新創建例外,如果你想和我解釋,如果你可以。謝謝!

java.lang.RuntimeException: Unable to start activity ComponentInfo{genius.mohammad.accelerometer.mouse/genius.mohammad.accelerometermouse.MainActivity}: java.lang.NumberFormatException: unable to parse 'MArcos' as integer 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) 
at android.app.ActivityThread.access$1500(ActivityThread.java:117) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:130) 
at android.app.ActivityThread.main(ActivityThread.java:3687) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:507) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.NumberFormatException: unable to parse 'MArcos' as integer 
at java.lang.Integer.parse(Integer.java:383) 
at java.lang.Integer.parseInt(Integer.java:372) 
at java.lang.Integer.parseInt(Integer.java:332) 
at genius.mohammad.accelerometermouse.MainActivity.updatePrefs(MainActivity.java:85) 
at genius.mohammad.accelerometermouse.MainActivity.onCreate(MainActivity.java:51) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) 

... 11多個

+0

你在使用職業警衛嗎?如果是這樣,可以解釋爲什麼你不熟悉變量'MArcos' – slayton

回答

3
Caused by: java.lang.NumberFormatException: unable to parse 'MArcos' as integer 

似乎在你的代碼(MainActivity.java: line number 85)你正在試圖解析字符串爲整數。

+0

哦哇,我甚至在發佈之前沒有讀到這一點。謝謝生病了! –