新版Eclipse使用遇到的問題總結


1、SDK下載很慢。

配置SDK代理,速度像飛一樣。建議先把20-24下完,不然后面遇到很多問題。

 

2、support-v7的問題

例如res\values\styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

下載相關的工具包,其實一開始SDK沒有額,很多博客說有,害我找了半天。

 

右鍵你的項目,在下方有個Android Tools,點擊Add Support Lib。。。,然后按提示下載。

其余的就是像別的博客說得導入v7工程還有jar包

 

3、v21相關問題

例如

appcompat\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.

要在v7項目里面改,在v7項目下的project.properties的target版本改得高一點

 

 

4、找不到圖標

例如error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').

因為自動生成的mainfest文件自帶的圖標是在drawable下的,但是仔細觀察那個文件夾下沒有圖片資源,而是在mipmap下的

把圖標路徑改了即可。

 

5、應該在R里面生成的東西沒有了

例如activity_main cannot be resolved or is not a field

刪掉import android.R;

 

6、無法預覽布局

例如:This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in 

 

ADT版本低,SDK版本高,把SDK版本調低點即可

 

 

 

大概就那么多,希望可以幫到大家

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM