Comments (26)
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.
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.
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.
from stripe-terminal-android.
@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.
@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.
@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.
@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.
@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.
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.
@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.
@danwaters-stripe Any news (or a Google bug ID) here? :)
from stripe-terminal-android.
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.
@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.
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.
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.
@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.
@raphaelm are you seeing the same thing with Java vs Kotlin? Seems like this bug only effects Kotlin?
from stripe-terminal-android.
@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.
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.
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.
@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.
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.
@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.
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.
Awesome, thanks
from stripe-terminal-android.
This has been fixed in 1.0.14, closing this issue for now.
from stripe-terminal-android.
Related Issues (20)
- Card reader overheating and crashing HOT 6
- Setting to turn off Play audible tones on contactless payment
- Tap to Pay- Crash at initTerminal when used along with Retrofit HOT 10
- Warning: com.google.android.gms:play-services-safetynet HOT 1
- Failed to decrypt an offline entity. HOT 4
- Tap to pay android via Stripe dashboard app failing to accept interac payments HOT 12
- Stop Discovery not working after reader disconnect HOT 3
- Question about HTTP timeout HOT 2
- Corrupt proto payload in the queue: terminal_sdk_wire_traces_2 HOT 5
- TTP - Failed to generate key pair [Android13] HOT 2
- Android java.security.invalidkeyexception keystore operation failed HOT 4
- The phone does not vibrate or emit sound when cashing via NFC in v3.6.0
- I can't go back to my app in S700 terminal after a payment in example code.
- StrongBoxUnavailableException/ProviderException: Failed to generate key error when connecting Tap to Pay reader HOT 2
- Bug in payment process after confirm payment timeout HOT 2
- eftpos support for Tap to Pay on Android devices HOT 1
- Fail to connect to a new reader using Bluetooth on SDK 3.7.0 HOT 1
- Crash on connecting to readers with "keystore operation failed"
- Crash on Android devices: AbstractMethodError com.stripe.jvmcore.crpcclient.CrpcTimeout HOT 4
- Issue connecting to reader HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stripe-terminal-android.