showAsAction 錯誤排除

使用Android Studio照著學習範例打時,showAsAction產生錯誤如下

Should use app:showAsAction with the appcompat library with xmlns:app="http://schemas.android.com/apk/res-auto"

when using the appcompat library, meun resources should refer to the showAsAction in the app:namespace, not the android: namespace.

similarly, when not using the appcompat library, you should be using the android:showAsAction attribute




解決
將該行android改成app即可

留言

這個網誌中的熱門文章

SQL SEVER備份與還原遭遇問題

DropDownList連動