關於Android多項目依賴在Eclipse中無法關聯原始碼的問題解決 (android dependencies 源碼)

來源:互聯網
上載者:User

標籤:

轉載於:http://www.cnblogs.com/flashlm/archive/2013/02/22/eclipse-android-project-dependencies-does-not-allow-modifications-to-source-attachments.html

 

被Eclipse中Android依賴項目無法關聯原始碼的問題困擾了許久,終於得到解決,大大提高了開發效率。

問題描述: 項目有A,B兩個Android Project組成, B是Android Library(android.library=true), A引用了B. 現在在A項目代碼裡點擊B項目的類,想查看定義, 不能直接開啟B項目的源碼(提示:The JAR of this class file belongs to container ‘Android Dependencies‘ which does not allow modifications to source attachments on its entries.)

 

解決方案: 在代碼被依賴的項目(就是上邊的B項目)的.classpath檔案中,將引用主要代碼的那行放在第一行,而不是其它java代碼,特別不能是gen檔案夾 <classpathentry kind="src" path="src/java"/>

關於Android多項目依賴在Eclipse中無法關聯原始碼的問題解決 (android dependencies 源碼)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.