aapt.exe已經停止運作
自從我想對Action Bar動手腳,改動menu/notice.xml之後,我一直不停拿到這個error:
而我的code長這樣:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@+id/action_refresh"
android:icon="@drawable/ic_menu_refresh"
android:title="@string/action_refresh"
android:showAsAction="ifRoom" />
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:showAsAction="never" />
</menu>
Google了三個小時,自己try看看問題出處,發現是這一行出問題:
android:icon="@drawable/ic_menu_refresh"
Google大神說aapt.exe停止運作是xml出問題,可能是Android找不到這個圖。可是明明我的 drawable/ 裡就有這個圖了啊啊啊~~~
(三個小時後)
結果:
是我很白痴的把png檔放到我project的備份去了…放錯檔案夾…我的時間...
還有圖太暗了,在暗色的action bar上看不到,太慘…
Comments
Post a Comment