#Thanhpham
1 messages ยท Page 1 of 1 (latest)
Have you added implementation 'com.google.android.material:material:<version>' to your gradle file and rebuilt again?
Can you also share the error message?
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
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?
This is an example where the styles.xml is: https://github.com/stripe/stripe-react-native/blob/master/example/android/app/src/main/res/values/styles.xml
You may try to find if similar path exists
More specifically, android/app/src/main/res/values/styles.xml
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?
In your styles.xml screenshot, I don't see MaterialComponents set:
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar"></style>
Oh that's right, I thought I had it when I read it
So in the build.gradle file, am I doing it right?
com.google.android.material:material:<version> should be added in android/app/build.gradle not android/build.gradle
oh okay, thank you so much
No problem! Happy to help ๐
hey broo, are you still there. When I build with expo, it shows an error like this
Do you know it ?
From the error message, it looks like you set more than one AppTheme in styles.xml
Can you ensure only one AppTheme is set?
That means I'm using the same on AppTheme right
You have two "AppTheme" here
Can you delete the styles of first AppTheme with parent from "Theme.AppCompat...."?
Can I rename it right?
You can try, but it won't be used any way if you change to a different name
That's it, thank you so much
No problem! Happy to help ๐
thanks a lot bro, i did it, it didn't crash anymore