#Thanhpham

1 messages ยท Page 1 of 1 (latest)

spice notchBOT
manic scarab
#

Have you added implementation 'com.google.android.material:material:<version>' to your gradle file and rebuilt again?

#

Can you also share the error message?

celest socket
#

Currently i am using stripe, when i build the app i get a crash on android app, after i found out i know that android has to use material component to be able to use cardform

#

So I'm looking for a way to add it using expo but can't find any documentation about it

celest socket
#

I tried using implementation 'com.google.android.material:material:1.7.0' to add to build.gradle, but I don't know where styles.xml is? Do I have to create this file myself?

manic scarab
#

More specifically, android/app/src/main/res/values/styles.xml

celest socket
#

When I use expo eject it gives me an android folder and inside the path as you indicated it already has the above code

#

And here's how to stop adding implementation 'com.google.android.material:material:1.7.0', is this correct?

manic scarab
#

In your styles.xml screenshot, I don't see MaterialComponents set:

<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar"></style>
celest socket
#

Oh that's right, I thought I had it when I read it

#

So in the build.gradle file, am I doing it right?

manic scarab
#

com.google.android.material:material:<version> should be added in android/app/build.gradle not android/build.gradle

celest socket
#

oh okay, thank you so much

manic scarab
#

No problem! Happy to help ๐Ÿ˜„

celest socket
#

hey broo, are you still there. When I build with expo, it shows an error like this

#

Do you know it ?

manic scarab
#

From the error message, it looks like you set more than one AppTheme in styles.xml

#

Can you ensure only one AppTheme is set?

celest socket
#

That means I'm using the same on AppTheme right

manic scarab
#

You have two "AppTheme" here

#

Can you delete the styles of first AppTheme with parent from "Theme.AppCompat...."?

celest socket
#

Can I rename it right?

manic scarab
#

You can try, but it won't be used any way if you change to a different name

celest socket
#

That's it, thank you so much

manic scarab
#

No problem! Happy to help ๐Ÿ˜„

celest socket
#

thanks a lot bro, i did it, it didn't crash anymore