2015-02-11 21 views
0

我嘗試通過Eclipse Luna使用Android開發工具。通過Eclipse進行Android開發

正是我嘗試使用的JBoss cordova developmet

我要運行Android模擬器的問題。所以我首先嚐試創建一個清晰的Android應用程序項目,它有以下錯誤。

enter image description here

enter image description here 我應該怎麼做來解決這些問題,並正常運行模擬器?

styles.xml

<resources> 

    <!-- 
     Base application theme, dependent on API level. This theme is replaced 
     by AppBaseTheme from res/values-vXX/styles.xml on newer devices. 
    --> 
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light"> 
     <!-- 
      Theme customizations available in newer API levels can go in 
      res/values-vXX/styles.xml, while customizations related to 
      backward-compatibility can go here. 
     --> 
    </style> 

    <!-- Application theme. --> 
    <style name="AppTheme" parent="AppBaseTheme"> 
     <!-- All customizations that are NOT specific to a particular API-level can go here. --> 
    </style> 

</resources> 
+0

您在'styles.xml'中遇到了一個問題,導致ANT無法構建您的'R'文件,導致'MainActivity'中的錯誤。請發佈'styles.xml'的內容。檢查控制檯(而不是錯誤日誌)以獲取更多信息。 – 2015-02-11 07:28:21

+0

我認爲該項目缺少android支持庫。 右鍵項目 - > Android工具 - >添加支持庫 – 2015-02-11 07:30:12

+0

@MattClark這裏是該文件http://www.filedropper.com/styles_2 – foc 2015-02-11 07:32:05

回答

2

動作條在支持庫V7發現。也許它失蹤了。 您可以右鍵單擊您的項目 - >屬性 - > Android的 在那裏,你應該看到添加庫帶有綠色標記類似如下: enter image description here

如果你沒有任何的圖書館裏,你應該導入圖書館轉到:文件 - >導入 - > Android的 - >將現有Android代碼導入工作區 然後尋找你的庫V7到像下圖中的SDK文件夾:

enter image description here

然後單擊Finish:

enter image description here

,並返回到您的項目點擊右鍵,進入屬性通過單擊添加按鈕並選擇庫添加庫:

enter image description here

希望這能解決你的問題!

+0

非常感謝您的回答。它似乎是solutin運行,但也許與日食的問題是更通用的,因爲它給了我這[2015-02-11 10:04:09 - android-support-v7-appcompat]警告:無法寫jarlist緩存文件C:\ Program Files(x86)\ Android \ android-sdk \ extras \ android \ support \ v7 \ appcompat \ bin \ jarlist.cache [2015-02-11 10:04:24 - android-support-v7- appcompat]警告:無法寫jarlist緩存文件C:\ Program Files文件(x86)\ Android \ android-sdk \ extras \ android \ support \ v7 \ appcompat \ bin \ jarlist.cache – foc 2015-02-11 08:06:20

相關問題