我在Eclipse ADT中使用Google Map。我跟着this和this教程。一切順利。然而,現在,當我試圖構建項目,Eclipse是說無法運行android項目作爲eclipse考慮它作爲庫
"Android Library projects cannot be launched"
我從一開始就在想,我可能點擊了一些錯誤的複選框,但錯誤依然存在再次嘗試。我已經導入的唯一的庫項目是谷歌播放服務庫。 任何幫助將是偉大的。謝謝:)
我在Eclipse ADT中使用Google Map。我跟着this和this教程。一切順利。然而,現在,當我試圖構建項目,Eclipse是說無法運行android項目作爲eclipse考慮它作爲庫
"Android Library projects cannot be launched"
我從一開始就在想,我可能點擊了一些錯誤的複選框,但錯誤依然存在再次嘗試。我已經導入的唯一的庫項目是谷歌播放服務庫。 任何幫助將是偉大的。謝謝:)
由於您在項目的屬性選項中勾選了「Is Library」,因此出現此錯誤。請取消選中該複選框,您不會再看到該錯誤。您的proejct是一個引用Google Play服務的應用項目,該項目是其引用的庫,但您的項目不是庫,因此您必須取消選中該複選框,因爲庫項目不包含.apk文件,因此無法啓動庫項目。
Here are the steps to run the Map project as a app project and not as a library:
- In the Package Explorer, right-click the library project and select Properties.
- In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
- **Do not** select the "is Library" checkbox and click Apply.
- Click OK to close the Properties window.
確保您已使用Internet和映射接收權限在清單文件中聲明瞭您的碎片活動。
感謝您的幫助;) – Ibtehaz
你不能啓動庫項目。將lib項目導入到您的Android項目並啓動該項目。 – Dhina
@Dhina,我的主項目不是一個lib項目。這是主要的項目。我使用谷歌播放服務作爲唯一的庫。 – Ibtehaz
您是否在您的項目中檢查Is Library?只要確保你沒有。 – Dhina