android No projects are found to import

來源:互聯網
上載者:User

如果發現匯入工程的時候,出現"No projects are found to import" 的提示,首先查看項目目錄中是否有隱藏檔案.project,還有目錄結構也還要有一個隱藏檔案.classpath, 如果沒有的解決辦法。
 
方法1:最直接的操作,可以把其它項目的.project, .classpath檔案拷貝過來,修改相應的地方則可。
1).project檔案只需要修改<name>AboxTVExchange</name>這個項目名稱則可
2) .classpath檔案通常不用改,內容如下:
<?xml version="1.0" encoding="UTF-8"?>
 
<classpath>
 
        <classpathentry kind="src" path="src"/>
 
        <classpathentry kind="src" path="gen"/>
 
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
 
        <classpathentry kind="output" path="bin"/>
 
</classpath>
 
kind= "... "是指這個目錄在project中的類型。kind= "src "為源檔案目錄,
這個目錄下的檔案會被編譯器編譯.   kind= "output "是java檔案編譯輸出
目錄,src目錄下的檔案會編譯到這個目錄下。
 
當修改項目屬性-> java   build   path時這個檔案會被自動修改
 
方法2:將源碼包移到非workspace目錄下,然後new -> android project -> create project from exist source
 
添加寫 工程名稱則可
注意如果不移到非workspace目錄下, 出現如下錯誤資訊:
 
Invalid project description
------>detail: ->>> xxxx(project path) overlaps the location of another project: 'xxxx'
eclipse外掛程式在建立項目的時候需要在workspace目錄下建立一個同名的目錄。
但發現workspace目錄下已存在對應的目錄時,就會報上面的處錯誤資訊了

 


摘自 Central-Perk的專欄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.