Closed RoarGronmo closed 2 years ago
Here's my two themes used
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Norva24ReporterTest2" parent="Theme.MaterialComponents.DayNight.DarkActionBar.Bridge">
<!--style name="Theme.Norva24ReporterTest2" parent="Theme.AppCompat.DayNight.DarkActionBar"-->
<!-- Primary brand color. -->
<item name="colorPrimary">@color/primaryColor</item>
<item name="colorPrimaryVariant">@color/primaryDarkColor</item>
<item name="colorOnPrimary">@color/primaryTextColor</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/secondaryColor</item>
<item name="colorSecondaryVariant">@color/secondaryDarkColor</item>
<item name="colorOnSecondary">@color/secondaryTextColor</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
<item name="actionOverflowMenuStyle">@style/Theme.Norva24ReporterTest2.PopupOverlay3</item>
<!--item name="recyclerViewStyle">@style/Theme.Norva24ReporterTest2.RecyclerViewOverlay</item-->
</style>
<style name="Theme.Norva24ReporterTest2.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Norva24ReporterTest2.PopupOverlay3" parent="@style/Widget.MaterialComponents.PopupMenu.Overflow">
<item name="android:popupBackground">@color/black</item>
<item name="android:actionMenuTextColor">@color/white</item>
</style>
<!--style name="Theme.Norva24ReporterTest2.RecyclerViewOverlay" parent = "@style/Widget.MaterialComponents.MaterialCalendar">
<item name="android:background">@color/secondaryDarkColor</item>
</style-->
<style name="Theme.Norva24ReporterTest2.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />
<style name="Theme.Norva24ReporterTest2.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light" />
</resources>
and night theme
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Norva24ReporterTest2" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/primaryColor</item>
<item name="colorPrimaryVariant">@color/primaryDarkColor</item>
<item name="colorOnPrimary">@color/primaryTextColor</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/secondaryColor</item>
<item name="colorSecondaryVariant">@color/secondaryDarkColor</item>
<item name="colorOnSecondary">@color/secondaryTextColor</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
It looks to me like this is likely not an issue on our end. I don't see any changes between 1.3.0-alpha02 and alpha03 within our themes.
This seems pretty strange. Has anything changed with the theme/context your no.norva24.norva24reportertest2.ui.activities.MainActivity
is using? Or the theme for MainActivity
being set in your Manifest? Is this happening when running the app or when running tests?
I am experiencing the same issue with 1.2.0
and 1.2.1
for bottom sheet with a theme extended fromWidget.MaterialComponents.TextInputLayout.OutlinedBox.Dense
.
10-19 22:00:06.893 31052 31052 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant). 10-19 22:00:06.893 31052 31052 E AndroidRuntime: at com.google.android.material.internal.ThemeEnforcement.checkTheme(ThemeEnforcement.java:243) 10-19 22:00:06.893 31052 31052 E AndroidRuntime: at com.google.android.material.internal.ThemeEnforcement.checkMaterialTheme(ThemeEnforcement.java:217) 10-19 22:00:06.893 31052 31052 E AndroidRuntime: at com.google.android.material.internal.ThemeEnforcement.checkCompatibleTheme(ThemeEnforcement.java:145) 10-19 22:00:06.893 31052 31052 E AndroidRuntime: at com.google.android.material.internal.ThemeEnforcement.obtainStyledAttributes(ThemeEnforcement.java:76) 10-19 22:00:06.893 31052 31052 E AndroidRuntime: at com.google.android.material.textfield.TextInputEditText.<init>(TextInputEditText.java:65) 10-19 22:00:06.893 31052 31052 E AndroidRuntime: at com.google.android.material.textfield.TextInputEditText.<init>(TextInputEditText.java:58)
@RoarGronmo @Vidyacharan Are you all able to post a full sample that I can run and try to debug?
Probably not related, but just in case. I am also seeing similar crash. I get it while trying to integrate a third party SDK. In our case, this SDK worked perfectly fine with 1.1.0 version and app being built with one monolith app module. But now we need to create instant app, so extracted that SDK into a dynamic module and now started seeing this crash. Even with 1.3.0-alpha03, it crashes.
After updating to Gradle 6.8-milestone-1 but still using kotlin 1.4.10 stable, the problems seem to disappear. Using AS4.2C14.
RG
Having the same issue when upgrading from alpha03 to alpha04. Pretty much the same setup as of original poster.
Is this still happening?
I'll close this issue for now due to no further info available. Please feel free to reopen it if this is still happening.
Description: Did just rise material from
com.google.android.material:material:1.3.0-alpha03
tocom.google.android.material:material:1.3.0-alpha03
and got this run-time error:
alpha02 does not produce this error.
Expected behavior: Compile and run as expected, but did not.
Source code: Instead of attaching all my project i attach the dependency trees, if you see any conflicts:
Android API version: API30
Material Library version: 1.3.0-alpha03
Device: Emulator API30:
Pixel 4 API 30
To help us triage faster, please check to make sure you are using the latest version of the library.
We also happily accept pull requests.
RG