#thiagomacauba88_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1367503945617899520
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- thiagomacauba88_api, 15 hours ago, 73 messages
Is this a new integration, or an existing one that started to fail? Did anything else change?
Hey Syn
I started a implementation using the version 19.1, but google requested to use 20.24 or later
after that i started to have an issue that i described in the link
yesterday your team said that i need to follow https://github.com/stripe/stripe-android/issues/7184#
i added the bridge:
import androidx.compose.runtime.Composable
// Used by Stripe Android SDK
// Work around for https://github.com/stripe/stripe-android/issues/7184
// This existed as Experimental in Compose 1.5, but was moved to a val in in Compose 1.6
@Suppress("unused")
object LocalSoftwareKeyboardController {
val current
@Composable
get() = LocalSoftwareKeyboardController.current
}
and added the libraries:
implementation "androidx.compose.ui:ui:1.5.1"
implementation "androidx.compose.material:material:1.5.1"
implementation "androidx.compose.ui:ui-tooling-preview:1.5.1"
implementation "androidx.activity:activity-compose:1.5.1"
implementation 'androidx.compose.runtime:runtime-android:1.5.1'
and this is my current log:
๐
From a brief search, it seems that error might be a caching error: https://stackoverflow.com/questions/74999456/fatal-exception-incompatible-class-change-error-drawscope-crash
Yeah sorry, I don't know at this point :(. You could create a new issue within the Github repo -- that is monitored by our Android Engineers and they might have some suggestions.
is it because im using java and not using the compose in my project?
I'm really not sure. One way to narrow things down here would be to spin up a fresh blank project and add the desired Stripe version and see if that repro's the error. Assuming it doesn't, then you can add your dependencies one by one to see where the dependency conflict lies.
Unfortunately dependency conflicts of this nature are notoriously hard to debug.
I don't know why they did either. Google Pay is supported in 19.1.
this is the reason: Stripe-Android SDK began supporting the API with version 20.24 (release notes). Please update to at least version 20.24
to have the Prod payments working, i need to set the merchandID from configuration.. correct?
yes
[CHANGED]6471 Updated Google Pay button to match new brand guidelines. You can now change the radius of the Google Pay and Link buttons with the Appearance API. Additionally, this change updates the com.google.android.gms:play-services-wallet version from 19.1.0 to 19.2.0-beta01.
Oh they care about the brand guidelines it seems then.
yep
i think that's the reason
iOS is just waiting for this, we need to release this asap
Well it goes back to what I stated before -- you need to narrow down what dependencies of your app aren't playing nice.
I can't do that for you unfortunately.
ok lets start from the beginning, i had this version 19.1 that works
changing to 20.24
and we can talk about the logs
i removed everything else that we added
Have you created a fresh app and install 20.24 and confirmed that works?
let me try
I have the issue back:
FATAL EXCEPTION: main
Process: com.RentRedi.RentRedi2, PID: 25919
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/ui/platform/LocalSoftwareKeyboardController;
following the workaround: https://github.com/stripe/stripe-android/issues/7184#issuecomment-1688281897
I'm still have the same issue
is it anything wrong?
Hi ๐
I'm stepping in as my colleague had to go
Hi!
What version of Compose are you using?
The GH issue you linked has many different approaches to solving this problem. What ones have you tried?
I added the bridge
implementation platform("androidx.compose:compose-bom:2024.02.01")
implementation 'androidx.compose.runtime:runtime-android:1.6.0'
implementation "androidx.compose.ui:ui"
implementation "androidx.compose.foundation:foundation"
implementation "androidx.compose.material:material"
implementation "androidx.activity:activity-compose"
implementation "androidx.navigation:navigation-compose"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose"
implementation "androidx.compose.ui:ui-tooling-preview"
configurations.all {
resolutionStrategy {
force "androidx.compose.ui:ui:1.6.0"
force "androidx.compose.material:material:1.6.0"
force "androidx.compose.foundation:foundation:1.6.0"
force "androidx.activity:activity-compose:1.8.0"
force "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2"
force "androidx.navigation:navigation-compose:2.6.0"
}
}
It seems like the compose:ui:1.6.0 is the problem (from what see).
ok, but do i need to change all of this to 1.6.0?
That is not what I am saying. I am saying you should try downgrading from compose UI 1.6.0 to an earlier version
@remote moat Hey! do you have any idea?
yep
just tried:
implementation platform("androidx.compose:compose-bom:2024.02.01")
implementation 'androidx.compose.runtime:runtime-android:1.6.0'
implementation "androidx.compose.ui:ui:1.6.0"
You need to be below 1.6.0
configurations.all {
resolutionStrategy {
force "androidx.compose.ui:ui:1.6.0" }}
That looks like it's still using 1.6.x; that error should go away if you actually got the version to change.
Did you try adding the bridge to the Stripe code as previously suggested?
If neither the bridge code in the correct place and properly integrated nor attempting to downgrade worked, I'd suggest that either the build process isn't picking up the correct things.
The bridge should allow 1.6.x to work; < 1.6.x should work without the bridge.
Can you clear all the build caches and try building again?
Are there build artifacts that show what versions were used? Where did you put the bridge code?
The filename ends in .kt ya?
What version of Material are you using?
Give me 5
i moved the 1.5.4 back
building
this is my libraries for now:
implementation platform("androidx.compose:compose-bom:2024.02.01")
implementation 'androidx.compose.runtime:runtime-android:1.5.4'
implementation "androidx.compose.ui:ui:1.5.4"
implementation "androidx.compose.material:material:1.5.4"
implementation "androidx.activity:activity-compose:1.5.4"
ill remove the bom one e see what happens
That's almost a 2 year old version of Material; why aren't you using the current version?
https://mvnrepository.com/artifact/androidx.compose.material/material/1.8.0 is the current version of material.
if i remove bom i have a different error: java.lang.IncompatibleClassChangeError: Found interface androidx.compose.ui.graphics.drawscope.DrawScope, but class was expected (declaration of 'androidx.compose.ui.graphics.drawscope.DrawScope' appears in /data/app/~~Dh7yBpCiKI6zrfHM-e0HPA==/com.RentRedi.RentRedi2-hesZ_SsAyi_CDKgFuuUujA==/base.apk!classes15.dex)
moving back
well, i dont care about the version of the material, we are not using, I'm just trying to the match with stripe
setting to 1.8.0
@remote moat Dependency 'androidx.compose.material:material-ripple-android:1.8.0' requires 'compileSdkVersion' to be set to 35 or higher.
Compilation target for module ':app' is 'android-34'
if i set compileSDKVersion to 35, i also need to fix a lot of things...
You're using version 1.5.4. I'd recommend trying a newer version that still supports your Android API version if you can find one.
ok let me try again
well, i dont care about the version of the material, we are not using, I'm just trying to the match with stripe
Why have you included it then? Also what version of com.stripe:stripeterminal are you using?
using material 1.6.8
same error
implementation 'com.stripe:stripe-android:20.24.0'
implementation 'androidx.compose.runtime:runtime-android:1.6.0'
implementation "androidx.compose.ui:ui:1.6.0"
implementation "androidx.compose.material:material:1.6.8"
implementation "androidx.activity:activity-compose:1.6.0"
Hello, my colleague had to step out but I can help. Still catching up a bit but overall the issue that you seem to get errors when building with our 20.24 android version and any version of material that you have tried so far?
yep, kind of
let me try to explain from the beginning
I started the implementation using 19.1 (works pretty well)
I submit the form to google to use GooglePay in prod, because we need to merchantID
google requested to upgrade to 20.24 or later
my issues starting from here
i found the workaround but still doesn't work
Right gotcha, overall goal is to build with 20.24 somehow, material is the current library that is complaining when you try to build with it
yep
material or the ui
i don't know exactly what stripe 20.24 needs
do you have any ideas?
I am not finding much and was about to reach out to some colleagues. I know you've been here for a bit, if you need to step out at any point I am happy to create a case and we can get back to you over email.
let's keep trying at least of the final of my day
i really need this
i already asked google again if we can keep 19.1
My colleague says that updating to a 21.X version of our library may help. Can you try doing that to see if it helps with the error?
https://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror
the problem to going to a latest version is because i also need to upgrade a lot of things like a gradle for example
i think one of the issues is because we are not using jetpackcompose for our project
so I'm kind of lost
@sinful mesa can you give me some ideas?
Unfortunately we haven't been finding much else on this. There is a google issuetracker where someone mentions fixing it but doesn't say how and another one that doesn't contain a solution
https://issuetracker.google.com/issues/290901622?pli=1
https://issuetracker.google.com/u/0/issues/294714305
is there anything we can escalate?
I think opening a new issue on the GH repo would be the best way at the moment. As my colleague mentioned earlier, it is monitored by our Android engineers so they may be have reccommendations for a fix or debugging
Apologies, I do wish I had better answers at the moment but my colleagues and I are still stumped here. I do think a GH issue is the best way to go forward here