#thiagomacauba88_api

1 messages ยท Page 1 of 1 (latest)

thorn berryBOT
#

๐Ÿ‘‹ 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.

wise scaffold
#

Is this a new integration, or an existing one that started to fail? Did anything else change?

quartz mist
#

Hey Syn

thorn berryBOT
quartz mist
#

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

#

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
}

GitHub

Summary Stripe crashes on rememberPaymentSheet.launch(). I'm using android compose 1.6.0-alpha03. If I'm switching back to version 1.5.0 it's working fine. So the problem only with new ...

#

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:

torn rain
#

๐Ÿ‘‹

quartz mist
#

let me try to clean the cache again

#

1 min

#

the same :/

torn rain
#

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.

quartz mist
#

is it because im using java and not using the compose in my project?

torn rain
#

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.

quartz mist
#

i dont know why google requested me to use the 20.24

#

19.1 works fine

torn rain
#

I don't know why they did either. Google Pay is supported in 19.1.

quartz mist
#

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?

torn rain
#

Supporting what API?

#

Are you using Payment Sheet here?

quartz mist
#

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.

torn rain
#

Oh they care about the brand guidelines it seems then.

quartz mist
#

yep

#

i think that's the reason

#

iOS is just waiting for this, we need to release this asap

torn rain
#

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.

quartz mist
#

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

torn rain
#

Have you created a fresh app and install 20.24 and confirmed that works?

quartz mist
#

let me try

thorn berryBOT
quartz mist
#

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;

#

I'm still have the same issue

#

is it anything wrong?

modern vapor
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague had to go

quartz mist
#

Hi!

modern vapor
#

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?

quartz mist
#

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"
}
}

modern vapor
#

It seems like the compose:ui:1.6.0 is the problem (from what see).

quartz mist
#

ok, but do i need to change all of this to 1.6.0?

modern vapor
#

That is not what I am saying. I am saying you should try downgrading from compose UI 1.6.0 to an earlier version

quartz mist
#

give another sec

#

still the same

thorn berryBOT
quartz mist
remote moat
#

Did you downgrade compose UI below 1.6.0?

#

(Hi!)

quartz mist
#

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"

remote moat
#

You need to be below 1.6.0

quartz mist
#

configurations.all {
resolutionStrategy {
force "androidx.compose.ui:ui:1.6.0" }}

remote moat
#

Not at.

#

The issue was introduced with 1.6.0

quartz mist
#

i already tried, but let me try again

#

building

#

the same thing: 1.5.4

remote moat
#

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?

quartz mist
#

yep

#

i just tried without the bridge

#

and got the same

remote moat
#

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?

quartz mist
#

sure

#

yep got the same

#

< 1.6 without the bridge

#

= 1.6 with the bridge

remote moat
#

Are there build artifacts that show what versions were used? Where did you put the bridge code?

quartz mist
remote moat
#

The filename ends in .kt ya?

quartz mist
#

Yep

#

I created class and add for the correct path

remote moat
#

What version of Material are you using?

quartz mist
#

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

remote moat
#

That's almost a 2 year old version of Material; why aren't you using the current version?

quartz mist
#

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

thorn berryBOT
quartz mist
#

@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...

remote moat
#

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.

quartz mist
#

ok let me try again

remote moat
#

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?

quartz mist
#

20.24

#

i had 19.1 before the google request

thorn berryBOT
quartz mist
#

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"

sinful mesa
#

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?

quartz mist
#

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

sinful mesa
#

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

quartz mist
#

yep

#

material or the ui

#

i don't know exactly what stripe 20.24 needs

#

do you have any ideas?

sinful mesa
#

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.

quartz mist
#

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

sinful mesa
quartz mist
#

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

quartz mist
#

@sinful mesa can you give me some ideas?

sinful mesa
quartz mist
#

is there anything we can escalate?

sinful mesa
#

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