Error:Attribute "theme" has already been defined
前回で gradle さんからのエラーは通り抜けた。
けど、今度はビルド時にこんなエラーが…。
/Users/paraches/AndroidStudioProjects/testproject/app/build/intermediates/exploded-aar/com.google.android.gms/play-services/5.0.89/res/values/wallet_colors.xml Error:Attribute "theme" has already been defined
wallet_colors.xml で定義している theme は既に定義されているって言われても…。
ちなみに wallet_colors.xml はこんなん。
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright 2014 Google Inc. All Rights Reserved. --> <resources> <!-- Wallet colors to support consistent Wallet fragment holo dark UI in client application regardless of the theme and device type --> <color name="wallet_bright_foreground_holo_dark">#fff3f3f3</color> <color name="wallet_dim_foreground_holo_dark">#bebebe</color> <color name="wallet_dim_foreground_disabled_holo_dark">#80bebebe</color> <color name="wallet_dim_foreground_inverse_holo_dark">#323232</color> <color name="wallet_dim_foreground_inverse_disabled_holo_dark">#80323232</color> <color name="wallet_bright_foreground_disabled_holo_light">#ffb2b2b2</color> <color name="wallet_bright_foreground_holo_light">#ff000000</color> <color name="wallet_hint_foreground_holo_light">#808080</color> <color name="wallet_hint_foreground_holo_dark">#808080</color> <color name="wallet_highlighted_text_holo_light">#6633b5e5</color> <color name="wallet_highlighted_text_holo_dark">#6633b5e5</color> <color name="wallet_holo_blue_light">#ff33b5e5</color> <color name="wallet_link_text_light">#0000ee</color> </resources>
で、いつもの stackoverflow で見つけたのがこれ。
この中の以下の回答がビンゴ!
just use latest (21) appCompat and google play services library
自分の場合、google play service library が 5.0.89 で最新(今?は 6.1.71)でなかった。
というわけで、build.gradle をこんな感じに変更。
// compile 'com.google.android.gms:play-services:5.0.89' compile 'com.google.android.gms:play-services:6.1.71'
これで無事、ビルドできました!