2016-08-11 2 views
0

Android Studioを使用してAndroidアプリケーションにStripeを統合しようとしています。これは私の支払いのレイアウトです:タグフラグメントの予期しない名前空間接頭辞「wallet」が見つかりました

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    xmlns:wallet="http://schemas.android.com/apk/res-auto" 
    tools:context="me.cm.ap.Payment"> 

<fragment 
    android:id="@+id/wallet_fragment" 
    android:name="com.google.android.gms.wallet.fragment.SupportWalletFragment" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    wallet:enviroment="test" 
    wallet:fragmentMode="buyButton" /> 

は、したがって、上記のコードで、私は「予期しない名前空間接頭辞 『財布言う

wallet:enviroment="test" 
wallet:fragmentMode="buyButton" 

でエラーになっている』タグフラグメントのために...」

は、私はすでに

としてaswell、私のGradleモジュールに

compile 'com.stripe:stripe-android:+' 

を追加しました

<meta-data 
     android:name="com.google.android.gms.wallet.api.enabled" 
     android:value="true" /> 

私のマニフェストに

問題は何ですか?どのように修正できますか?

答えて

1

あなたはプレイサービスを追加didntの場合はそこに行を追加し、再構築します。

compile 'com.google.android.gms:play-services:9.4.0' 
compile 'com.google.android.gms:play-services-wallet:9.4.0' 

より後、あなたはまだエラーは次のように支払いのレイアウトを変更することをお持ちの場合:

<fragment xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:wallet="http://schemas.android.com/apk/res-auto" 
android:id="@+id/wallet_fragment" 
android:name="com.google.android.gms.wallet.fragment.SupportWalletFragment" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
wallet:environment="test" 
wallet:fragmentMode="buyButton"/> 
+0

私はまだ同じを取得していますエラー。私は最初にプレイサービスウォレットを追加していなかったが、それは問題を解決しなかった。あなたのフラグメントコードも使ってみましたが、wallet:environmentとfragmentModeで同じエラーが出ました。これらの行には下線が引かれていますが、アプリを実行できますが、アンドロイドの支払ボタンをクリックすることはできません。 – Kamihan

関連する問題