skip to Main Content

Android Studio – Change layout background in Android Studio

Although I used to change the background with the code below, but now the program crashes binding.cardLAYOUT.setBackgroundResource( R.drawable.gift_card_100); or binding.cardLAYOUT.setBackground(ContextCompat.getDrawable(this, R.drawable.gift_card_1)); I did not change anything, the images and codes are the same as before <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/cardLAYOUT" android:layout_width="0dp" android:layout_height="0dp" android:layout_marginStart="24dp"…

VIEW QUESTION

Android Studio – FAILURE: Build failed with an exception – Android

I am trying to upgrade my old Android project and getting below errors : > Task :app:mergeDebugResources FAILED /home/jaiminmodi/.gradle/caches/transforms-3/08e5f3aa7ebe2a199cff2b386779108c/transformed/core-1.7.0/res/values/values.xml:162:4: Duplicate value for resource 'attr/font' with config 'DEFAULT' and product ''. Resource was previously defined here: com.brian.skyazul.activity.app-mergeDebugResources-16:/values/values.xml:2739: . > Task :app:mergeLibDexDebug…

VIEW QUESTION
Back To Top
Search