YCharts icon indicating copy to clipboard operation
YCharts copied to clipboard

Error when building with Material 3 Theme

Open RedSunMaster opened this issue 1 year ago • 1 comments

Im using my own custom Material 3 Theme which is giving this error when i try to run my app:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mcnut.banking/com.mcnut.banking.fragments.LoginActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

Manifest File: android:theme="@style/Theme.Budgeting">

Activity Class:

class LoginActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        WindowCompat.setDecorFitsSystemWindows(window, false)
        setContent {...

Themes.xml: <style name="Theme.Budgeting" parent="Theme.Material3.Dark.NoActionBar">...

Is there any way i can avoid this error coming up or is it just not possible to use the charts in a theme like this.

Thanks

RedSunMaster avatar Jul 28 '23 09:07 RedSunMaster

Facing same issue. Were you able to resolve it ? @RedSunMaster

passiondroid avatar Feb 20 '24 11:02 passiondroid