Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7193

CardView is causing app to crash (shown in the picture)

$
0
0

I keep getting crashed everytime i run the code, i tried to remove the CardView codes and it's not crashed anymore. Can u help me guys, since im new to this environment and currently im working on a project, am i doing it wrong with the cardView codes?. Thanks

crashed app

<?xml version="1.0" encoding="utf-8"?><androidx.constraintlayout.widget.ConstraintLayout    xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res-auto"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:background="@drawable/bgapps"    tools:context=".utama"><LinearLayout        android:layout_width="match_parent"        android:layout_height="match_parent"        android:orientation="vertical"><RelativeLayout            android:layout_width="match_parent"            android:layout_height="match_parent"            android:layout_marginLeft="20dp"            android:layout_marginRight="20dp"><androidx.cardview.widget.CardView                android:id="@+id/cardCam"                android:layout_width="120dp"                android:layout_height="125dp"                android:layout_below="@+id/cardPupuk"                android:layout_marginStart="125dp"                android:layout_marginTop="40dp"                android:layout_marginEnd="@+id/soilIv"                app:cardBackgroundColor="#989595"                app:cardCornerRadius="12dp"><ImageView                    android:id="@+id/camIv"                    android:layout_width="71dp"                    android:layout_height="71dp"                    android:layout_gravity="center"                    android:src="@drawable/cam" /></androidx.cardview.widget.CardView></RelativeLayout></LinearLayout></androidx.constraintlayout.widget.ConstraintLayout>

Viewing all articles
Browse latest Browse all 7193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>