Java 条带CardInputWidget未在新更新中显示
升级条带实现后,CardInputWidget不再显示:/ 错误: 膨胀类com.stripe.android.view.CardInputWidget时出错 格兰德实施: 实现'com.stripe:stripe android:16.9.0' 付款对话框的Xml代码:Java 条带CardInputWidget未在新更新中显示,java,android,stripe-payments,Java,Android,Stripe Payments,升级条带实现后,CardInputWidget不再显示:/ 错误: 膨胀类com.stripe.android.view.CardInputWidget时出错 格兰德实施: 实现'com.stripe:stripe android:16.9.0' 付款对话框的Xml代码: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fitsSystemWindows="false">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center_vertical"
android:padding="8dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:src="@drawable/card_outline_stripe" />
<com.example.dev.customs.CustomTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:text="@string/enter_your_payment_method"
android:textSize="20sp"
app:fontTextView="MuseoSans-900" />
<com.stripe.android.view.CardInputWidget
android:id="@+id/dialogue_edit_payment_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="ltr"
android:layout_marginTop="5dp"
android:padding="3dp"
android:background="@drawable/bg_stripe_payment"
android:textDirection="ltr" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp">
<Button
android:id="@+id/btn_submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/label_submit"
android:padding="3dp"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="@color/gradient_blue_1"
android:background="@drawable/btn_submit_bg"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
代码:
btnStartPlan.setOnClickListener(新视图.OnClickListener(){
showPaymentDialog();}
dialog.setContentView(R.layout.dialog_payment);你有更多的上下文吗?你使用的Android版本/API级别是什么?这是在物理设备上还是在模拟器上?你有没有尝试过对项目进行新的渐变同步?你好,是的,我做了一个项目清理和重建。我正在物理设备上测试(三星、oppo、华为、lge nexus 5x)版本8、9、10