Closed ambr89 closed 5 months ago
Can you provide an example project where this is reproducible?
Hi,
yes you can clone the project from here: https://github.com/ambr89/test_prj
The difference from your documentation is:
in gradle-wrappre.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
and in android/build.gradle
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.0' //This move to 8.0.0
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
https://github.com/flutter-stripe/flutter_stripe/pull/1216 was merged - does it help with Gradle 8.0?
Hi,
no, the error on update 9.2.0 is the same.
e: /Users/ambra/.pub-cache/hosted/pub.dev/stripe_android-9.2.0/android/src/main/kotlin/com/reactnativestripesdk/CardFormView.kt: (33, 71): Unresolved reference: style
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':stripe_android:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
Hi,
any news about this?
No news. It's best to use a compatible gradle version for now, if that's the only difference for you.
Hi,
no problem I've found a solution because I cannot downgrade gradle in my project.
Here there are changes for work with gradle 8.0 and above:
In stripe_android-9.2.0/android/build.gradle
android {
namespace 'com.flutter.stripe'
compileSdkVersion 32
//Add this code block
def javaVersion = JavaVersion.VERSION_1_8
compileOptions {
sourceCompatibility javaVersion
sourceCompatibility javaVersion
}
kotlinOptions {
jvmTarget = javaVersion.toString()
}
…
}
in stripe_android-9.2.0/android/src/main/kotline/com/reactnativestripesdk/CardFormView.kt
change this:
internal var cardForm: CardFormView = CardFormView(context, null, R.style.StripeCardFormView_Borderless
with:
internal var cardForm: CardFormView = CardFormView(context)
just with this you can test plugin in debug mode,
for build release apk or appbundle add also this:
In stripe_android-9.2.0/android/proguard-rules.txt
# add this to the end of file
-dontwarn com.google.android.libraries.places.api.Places
-dontwarn com.google.android.libraries.places.api.model.AddressComponent
-dontwarn com.google.android.libraries.places.api.model.AddressComponents
-dontwarn com.google.android.libraries.places.api.model.AutocompletePrediction
-dontwarn com.google.android.libraries.places.api.model.AutocompleteSessionToken
-dontwarn com.google.android.libraries.places.api.model.Place$Field
-dontwarn com.google.android.libraries.places.api.model.Place
-dontwarn com.google.android.libraries.places.api.model.TypeFilter
-dontwarn com.google.android.libraries.places.api.net.FetchPlaceRequest
-dontwarn com.google.android.libraries.places.api.net.FetchPlaceResponse
-dontwarn com.google.android.libraries.places.api.net.FindAutocompletePredictionsRequest$Builder
-dontwarn com.google.android.libraries.places.api.net.FindAutocompletePredictionsRequest
-dontwarn com.google.android.libraries.places.api.net.FindAutocompletePredictionsResponse
-dontwarn com.google.android.libraries.places.api.net.PlacesClient
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivity$g
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Args
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider
-dontwarn com.stripe.android.stripecardscan.cardscan.CardScanSheet$CardScanResultCallback
-dontwarn com.stripe.android.stripecardscan.cardscan.CardScanSheet$Companion
-dontwarn com.stripe.android.stripecardscan.cardscan.CardScanSheet
-dontwarn com.stripe.android.stripecardscan.cardscan.CardScanSheetResult$Completed
-dontwarn com.stripe.android.stripecardscan.cardscan.CardScanSheetResult$Failed
-dontwarn com.stripe.android.stripecardscan.cardscan.CardScanSheetResult
-dontwarn com.stripe.android.stripecardscan.cardscan.exception.UnknownScanException
-dontwarn com.stripe.android.stripecardscan.payment.card.ScannedCard
Hi, any news on this issue? I am experiencing the same problem
Hi. This is still a problem. Is there any possible update to this? Any work around for CI/CD workflows?
Bump. Please include a proguard file for this library for use with R8.
not reproducible anymore
Describe the bug
During the android build I receive an Execution failed:
e: file:///.../.pub-cache/hosted/pub.dev/stripe_android-9.1.0/android/src/main/kotlin/com/reactnativestripesdk/CardFormView.kt:33:71 Unresolved reference: style
FAILURE: Build failed with an exception.
To Reproduce I use:
change build.gradle into stripe_android-9.1.0 package
These changes are needed to try to compile with Flamingo and Java 1.8
I've tried with version 8.0.0+1, 9.0.0+1 and 9.1.0 and always I get this error. Thanks in advance. Ambra