本帖最后由 wh88791785 于 2014-10-12 23:03:53 编辑

解决方案 »

  1.   


    10-12 22:57:34.740: E/AndroidRuntime(6104): Caused by: java.lang.NullPointerException
    10-12 22:57:34.740: E/AndroidRuntime(6104):  at com.example.music.OtherActivity.onCreate(OtherActivity.java:29)你贴的代码不对,错误是在OtherActivity.java里,第29行。
    估计是某个id和layout文件没对应上,导致findViewById返回空指针。
      

  2.   

    非常感谢
    lagcat不会看,你一下指出来了!!!谢了
      

  3.   

    LOG 一般注意红色的,如:
    12 22:46:54.700: E/AndroidRuntime(3818): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.music/com.example.music.OtherActivity}: java.lang.NullPointerException是这次错误的关键行。
      

  4.   

    at com.example.music.OtherActivity.onCreate(OtherActivity.java:29)错误报得挺明显了
      

  5.   

    要说的被楼上说完了。空指针异常,在OtherActivity的第29行。你是不是在那行用intent的获取了什么值,而在之前的activity又没传。