最近利用Eclipse寫android程序,在debug時,總是提示The source attachment does not contain the source for the file Activity.class.
在網上查了很多,最靠譜的說法是代碼沒有與文件關聯,解決的辦法在這2個blog上寫了http://blog.csdn.net/xinzheng_wang/article/details/7428824
http://blog.sina.com.cn/s/blog_724d24bf01010ag9.html,但是這里面在platforms里的android-17下建一個sources文件夾然后把android源碼解壓到sources文件夾下,
再點擊add attched source,選擇external folder選擇剛剛建立的那個sources文件夾---確定就可以。
但是這個方法沒能解決我的問題,我在android-17下建立sources文件夾沒有效果,但是在SDK目錄下有一個sources文件夾,所以點擊剛剛的add attched source后選擇SDK目錄下的sources文件夾,再確定,就解決了我的問題。