Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building with Material 3 Theme #126

Open
RedSunMaster opened this issue Jul 28, 2023 · 1 comment
Open

Error when building with Material 3 Theme #126

RedSunMaster opened this issue Jul 28, 2023 · 1 comment

Comments

@RedSunMaster
Copy link

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

@passiondroid
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants