# Android mobile application crashes in zoom meetings due to Material Theme attribute not being set

**URL:** <https://devforum.zoom.us/t/android-mobile-application-crashes-in-zoom-meetings-due-to-material-theme-attribute-not-being-set/85315>\
**Category:** Android\
**Created:** [March 25, 2023, 2:16am UTC](https://devforum.zoom.us/t/android-mobile-application-crashes-in-zoom-meetings-due-to-material-theme-attribute-not-being-set/85315 "2023-03-25T02:16:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin.hamrick](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@benjamin.hamrick](https://devforum.zoom.us/u/benjamin.hamrick)\
**Post date:** [March 25, 2023, 2:16am UTC](https://devforum.zoom.us/t/android-mobile-application-crashes-in-zoom-meetings-due-to-material-theme-attribute-not-being-set/85315/1 "2023-03-25T02:16:27Z")

</div>

**Description**  
Our application experiences a crash while users are in zoom meetings. I have yet to be able to reproduce the crash, however I believe it is similar to [this](https://devforum.zoom.us/t/android-tablet-crash-during-polls/65007) other crash, which occurs during polls. I have found that in firebase crashlytics the event correlates with the user event of being polled in a zoom meeting. I believe the resolution is to check the dependencies and fix any that don’t match, but I would like to make sure we have the correct dependencies.

Crash log stack trace:

```auto
Fatal Exception: android.view.InflateException: Binary XML file line #23 in com.ourapp.mobile:layout/mtrl_layout_snackbar: Binary XML file line #23 in com.ourapp.mobile:layout/mtrl_layout_snackbar: Error inflating class com.google.android.material.snackbar.Snackbar$SnackbarLayout

Caused by android.view.InflateException: Binary XML file line #23 in com.ourapp.mobile:layout/mtrl_layout_snackbar: Error inflating class com.google.android.material.snackbar.Snackbar$SnackbarLayout…
Caused by java.lang.IllegalArgumentException **com.google.android.material.snackbar.Snackbar.SnackbarLayout requires a value for the com.ourapp.mobile:attr/colorSurface attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant).**
com.google.android.material.resources.MaterialAttributes.resolveOrThrow (MaterialAttributes.java:69) 
com.google.android.material.resources.MaterialAttributes.resolveOrThrow (MaterialAttributes.java:84) 
com.google.android.material.color.MaterialColors.getColor (MaterialColors.java:69) 
com.google.android.material.color.MaterialColors.layer (MaterialColors.java:130) 
com.google.android.material.snackbar.BaseTransientBottomBar$SnackbarBaseLayout.createThemedBackground (BaseTransientBottomBar.java:1298) 
com.google.android.material.snackbar.BaseTransientBottomBar$SnackbarBaseLayout.<init> (BaseTransientBottomBar.java:1149) 
com.google.android.material.snackbar.Snackbar$SnackbarLayout.<init> (Snackbar.java:496) 
java.lang.reflect.Constructor.newInstance0 (Constructor.java) 
java.lang.reflect.Constructor.newInstance (Constructor.java:343) 
android.view.LayoutInflater.createView (LayoutInflater.java:858) 
android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:1010) 
android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:965) 
android.view.LayoutInflater.inflate (LayoutInflater.java:663) 
android.view.LayoutInflater.inflate (LayoutInflater.java:538) 
com.google.android.material.snackbar.BaseTransientBottomBar.<init> (BaseTransientBottomBar.java:358) 
com.google.android.material.snackbar.Snackbar.<init> (Snackbar.java:112) 
com.google.android.material.snackbar.Snackbar.makeInternal (Snackbar.java:216) 
com.google.android.material.snackbar.Snackbar.make (Snackbar.java:158)

```

**Which Android Meeting SDK version?**  
SDK Version:  
5.13.5.11583

Dependencies:

```auto
androidx.security:security-crypto:1.1.0-alpha03
com.google.crypto.tink:tink-android:1.5.0
com.google.android.exoplayer:exoplayer-core:2.16.1
com.google.android.exoplayer:exoplayer-ui:2.17.1
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0
androidx.appcompat:appcompat:1.3.1
androidx.constraintlayout:constraintlayout:2.1.0
com.google.android.material:material:1.4.0
com.google.android:flexbox:2.0.1
androidx.multidex:multidex:2.0.0
com.google.code.gson:gson:2.8.1
com.github.bumptech.glide:annotations:4.11.0
com.github.bumptech.glide:glide:4.11.0
androidx.recyclerview:recyclerview:1.2.1
com.airbnb.android:lottie:4.0.0
androidx.window:window:1.0.0
androidx.window:window-java:1.0.0
org.jetbrains.kotlin:kotlin-stdlib:1.6.0
androidx.core:core-ktx:1.7.0
androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0
androidx.lifecycle:lifecycle-runtime-ktx:2.4.0
androidx.fragment:fragment-ktx:1.4.1

```

**To Reproduce(If applicable)**  
Work in progress.

**Troubleshooting Routes**  
I have checked that we define our material theme correctly in the application, so that should not be the issue. I have also looked at any custom snackbars we implement, but they are correctly styled and have their text color set, so the colorSurface attribute should be set.

**Smartphone (please complete the following information):**

- Device: Samsung Galaxy S22, Samsung Galaxy S21 5G, Samsung Galaxy S21 FE 5G, Samsung Galaxy S9, Motorola Moto G Power 2021, Motorola Moto G(7) Power, Xiaomi Redmi Note, Huawei P Smart Z, Google Pixel 7, Google Pixel 6, Google Pixel 6a, and many more.
- OS: Android 13, 12, 11, 10 , etc.

**Additional context**  
The crash also occurs in tablets ( which we do not support, but the fact that it’s similar to the snackbar crash is interesting. )

Crash log stack trace:

```auto
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ourapp.mobile/com.zipow.videobox.ZmPollingActivity}: **java.lang.IllegalArgumentException: com.google.android.material.dialog.MaterialAlertDialogBuilder requires a value for the com.ourapp.mobile:attr/colorSurface attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant).**
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2974)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
       at android.app.ActivityThread.-wrap11(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:7000)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

```

Tables affected:

- Device: Samsung Tab A, Samsung Tab A7, Samsung Tab A (2016), LGE G Pad 5 10.1 FHD, Google Cros Intel Gemini Lake Chromebook, and more.
- OS: Android 13, 12, 11, 10, etc.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 24, 2023, 12:16pm UTC](https://devforum.zoom.us/t/android-mobile-application-crashes-in-zoom-meetings-due-to-material-theme-attribute-not-being-set/85315/2 "2023-04-24T12:16:30Z")

</div>

Closed on April 24, 2023, 12:16pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
