2017-09-05 5 views
0

xamarin.androidにストライプペイメントゲートウェイを統合しようとしていますが、アプリケーションクローズの問題があります。ここで私が試したサンプルコードです。xamarin androidにストライプビューペイメントゲートウェイを統合している間にアプリケーションがクラッシュしました

サンプルコード:

[assembly: ExportRenderer(typeof(PaymentView), typeof(CardInputActivity)] 
namespace SampleProject.Droid.PaymentController 

public class CardInputActivity(Bundle bundle) : Activity 
{ 
    base.OnCreate(bundle); 

    SetContentView(Resource.Layout.CardInput); 

    Helper.StripeView = FindViewById<StripeView>(Resource.Id.stripeLayoutOne); 
} 

CardInput.axml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:padding="20dp"> 
<Stripe.StripeView 
    android:id="@+id/stripeView" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_marginBottom="10dp" /> 
</LinearLayout> 

これは私が試してみましたコードです。上記の 'CardInPutActivity'はアンドロイドのレンダラークラス、 'CardInputView'はリソースフォルダのレイアウトファイル、 'PaymentView'はビューを含むポータブルクラスです。

答えて

0

残念ながら、私は答えが何であるか分かりません。 Xamarin Stripeコンポーネントは数年前のことであり、もう動作しない可能性があります。このコンポーネントはXamarin自身によって作成されたものです(1)。

それ以外では、デバッガを使用してアプリケーションを段階的に実行したり、何かが落ちている場所を確認するためにSystem.out.println()ステートメントを追加しようとします。

[1] https://components.xamarin.com/view/stripe

関連する問題