Long.getLong() failing, returning null to valid string
问题 I've spent the past two hours debugging what seems extremely unlikely. I've stripped the method of a secondary Android Activity to exactly this: public void onClick(View v) { String str = "25"; long my_long = Long.getLong(str); } // onClick (v) And yeah, I get a crash with the good ol' NullPointerException: 09-11 02:02:50.444: ERROR/AndroidRuntime(1588): Uncaught handler: thread main exiting due to uncaught exception 09-11 02:02:50.464: ERROR/AndroidRuntime(1588): java.lang