Giter VIP home page Giter VIP logo

Comments (26)

danwaters-stripe avatar danwaters-stripe commented on August 18, 2024 3

Yeah, we've confirmed with Google that this appears to be a bug with Android Studio. We're hoping they'll be able to fix it soon, but we'll keep this issue updated with progress.

from stripe-terminal-android.

danwaters-stripe avatar danwaters-stripe commented on August 18, 2024

Hmm, is this happening when you build with gradle on the command line, or is this just a problem in Android Studio? If you are getting an error on the command line, can you post that here?

from stripe-terminal-android.

davelogan avatar davelogan commented on August 18, 2024

Actually, gradle command line works. What is odd is no actual compiler error (my mistake). I can run the example kotlin app using rc2 and rc1. But when I use rc2 I see this (some imports turning red) in android studio.

Screen Shot 2019-10-21 at 5 17 21 PM

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

@davelogan Is this after invalidating cache and resetting the build? I notice that, depending on the gradle change, a simple gradle sync often isn't enough - rc1 to rc2 was a pretty major upgrade, so I'd recommend a full clean build.

from stripe-terminal-android.

davelogan avatar davelogan commented on August 18, 2024

@chander-stripe I tried that already. It must an issue with Android Studio. I will close this because the gradle scripts are working and the app is running.

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

@davelogan - out of curiosity, what version of Android Studio and gradle are you using? Whenever I try, it seems to work for me - on 3.5.1 on Android Studio and gradle both

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

@davelogan out of curiosity - can you try making this example app in Java and seeing if the syntax highlighting issue goes away ?

from stripe-terminal-android.

davelogan avatar davelogan commented on August 18, 2024

@chander-stripe Using v3.5.1 also... I fixed it by deleting the .idea folder and then doing "invalidate caches / restart". Thanks for the help!

from stripe-terminal-android.

Gur814 avatar Gur814 commented on August 18, 2024

I'm experiencing this same issue, but deleting .idea and "Invalidate Caches / Restart" isn't helping. I've created a small project that demonstrates this:

https://github.com/Gur814/stripe-terminal-android-bug

This also happens in the example application. However, this only seems to affect Kotlin. In the Java example app everything is found just fine.

If I change the version from 1.0.0 to 1.0.0-rc1, the problem is gone.

I'm running Android Studio 3.5.1 on both macOS and Windows. I've tried just about every cache clearing trick in the book. Am I missing something?

Thanks!

from stripe-terminal-android.

davelogan avatar davelogan commented on August 18, 2024

@chander-stripe Using v3.5.1 also... I fixed it by deleting the .idea folder and then doing "invalidate caches / restart". Thanks for the help!
@Gur814
I should have re-opened this ticket. I thought I was the only one having the issue. It is still happening for me as well. I spoke too soon when I closed the ticket. When I recompiled the imports were highlighted in red once again.

from stripe-terminal-android.

raphaelm avatar raphaelm commented on August 18, 2024

@danwaters-stripe Any news (or a Google bug ID) here? :)

from stripe-terminal-android.

Jarrette avatar Jarrette commented on August 18, 2024

I'm also experiencing this. I'm starting to panic because I remember reading an email that stripe would stop working in January at some point if we didn't upgrade to 1.0.0 or later. I have multiple live customers and thousands of dollars in transactions per day happening through terminal beta which is working great. What is the exact deadline for us to move over??

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

@raphaelm - Unfortunately very little progress here, but here is the link.

@Jarrette is this still happening when you've upgraded to the GA version? Also, out of curiosity, is this still happening for you when you upgrade to the Android Studio 4.0 canary?

from stripe-terminal-android.

Jarrette avatar Jarrette commented on August 18, 2024

using this my app works fine:
implementation 'com.stripe:stripeterminal:1.0.0-b9'

using this completely breaks everything:
implementation 'com.stripe:stripeterminal:1.0.1'

I'm using AS 3.5.3, didn't even know there was a 4.0, I'll look into that.

I also tried deleting .idea and invalidating/reset

Update: just verified that it's doing the same thing in AS 4.0 Canary 7

from stripe-terminal-android.

Jarrette avatar Jarrette commented on August 18, 2024

Something very interesting, all the com.stripe.stripeterminal classes are recognized in my JAVA files and NOT my Kotlin files. Not sure if this gives you any clues @chander-stripe

from stripe-terminal-android.

raphaelm avatar raphaelm commented on August 18, 2024

@chander-stripe Too bad :( This makes it really hard for us to integrate Stripe Terminal into our application. Seems like the best way is to code the integration agianst 1.0.0-b9 and then update to 1.0.1 and fix issues without IDE help? Doesn't sound much fun since the package structure changed.

Can't you debug what changed between 1.0.0-b9 and 1.0.0-rc2 causing this issue? Because even if it clearly is a bug in Android Studio, maybe you can avoid triggering it?

from stripe-terminal-android.

Jarrette avatar Jarrette commented on August 18, 2024

@raphaelm are you seeing the same thing with Java vs Kotlin? Seems like this bug only effects Kotlin?

from stripe-terminal-android.

raphaelm avatar raphaelm commented on August 18, 2024

@Jarrette I didn't test that but I would expect it to be the same bug, yes. However, rewriting all of our affected existing activities in Java is not really an option ;)

from stripe-terminal-android.

Jarrette avatar Jarrette commented on August 18, 2024

yeah, that's a non starter for me as well, just hoping it gets someone closer to finding out what is wrong if we know that java files aren't affected. Even if you start a blank java class and try importing from com.stripe.stripeterminal...

from stripe-terminal-android.

pc-coholic avatar pc-coholic commented on August 18, 2024

Here is a possible (but also not very pretty) workaround:

Get the stripeterminal-1.0.1.aar and extract the classes.jar-file therein. Open said classes.jar-file and remove the com/stripe/kotlin-folder. Save the jar and overwrite the existing jar in the aar.

Now change the implementation-line to pull your local aar instead of downloading it.

Yes, this is not a very elegant solution - but it should allow us to use the Stripe Terminal library with our Kotlin-projects until Stripe/Google/JetBrains figures out how to properly fix. At that point, we can just drop the local aar and go back to the maven-version.

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

@Jarrette is this still happening for you? Mysteriously I'm not able to repro this at all anymore 🤔(tested with the more recent 1.0.7 though)

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

Apologies for the delay, I've finally gotten around to testing @pc-coholic 's fix here, and it works beautifully.

I'm going to add this step into our deploys, so we'll automatically do this for all future deploys and fix this issue for now.

I'll deploy early next week and close this issue once I validate that it works.

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

@pc-coholic , @Jarrette , @raphaelm @davelogan , @Gur814

Can you help me confirm that this fix works for you all?
Can you check out my chander/prove_shading_fix branch and verify that Android Studio behaves as you expect?
If so I'll merge this next week

from stripe-terminal-android.

pc-coholic avatar pc-coholic commented on August 18, 2024

We are using com.stripe:stripeterminal:1.0.8 without my workaround in our app right now, and it compiles just fine.

I'll give your PR a test run later today and update here

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

Awesome, thanks

from stripe-terminal-android.

chander-stripe avatar chander-stripe commented on August 18, 2024

This has been fixed in 1.0.14, closing this issue for now.

from stripe-terminal-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.