Eclipse 開啟已存在的Android項目的問題

來源:互聯網
上載者:User

 

1、  點擊菜單“File”-- "Import",會彈出 Import 對話方塊:

 

 

 

2,  選擇“General”—“Existing Projects into Workspace” 後點擊“Next”:

 

 

 

1、  選擇”Browse” 選擇項目所在目錄後,點擊“確定” 即可匯入。

 

常見問題:

 

1、項目匯入後,提示:[  Chapter04_UI_AlertDialog01] Unable to resolve target 'android-3'

 

解決方案:開啟項目中的project.properties 檔案,將” target=android-3”修改成“target=android-10” 即你安裝的Android SDK API 版本號碼。

 

2、項目匯入後,提示:[ Chapter04_UI_AlertDialog01] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.

 

解決方案:1)、項目右鍵--Android Tools--Fix Project Properties

 

          2)、若不可以,檢查 project--properties--java compiler, 確認JDK compliance被設定為1.6,並且enable specific setings.

 

      3、erros : the type R is already defined

 

            解決方案:

 

            不管有沒有R.java檔案,先直接將R.java檔案刪除,然後在左側Package Explorer中選中工程,然後點擊Project菜單,選擇Close Project.將項目前閉,然後再重新點Project菜單中的Open Project將工程開啟,這樣的話,Eclipse為自動為我們重建R.java檔案。

 

大家一定要注意,R.java檔案是系統自動為我們維護的,任何時候都不需要我們自己手動去維護……

 

     4、erros : skipping index file   解決方案:直接刪除該檔案。

 

聯繫我們

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