-
-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task :stripe_android:compileDebugJavaWithJavac FAILED #1513
Comments
Any update on this i am having the same issue i am using flutter_stripe: ^9.4.0 stuck from hours now :/ |
I'm also having the same problem. |
You need to update android studio and update the sdk to the latest stable release (giraffe). Also upgrade to android gradle plugin 8 |
Its failing on Codemagic CI as well ! |
I tried tracing the PR. Isn't this related to this issue? |
I am still stuck with version flutter_stripe: ^9.5.0+1 its not working on Codemagic Ci and on my Android studio local build as well. I have updated android studio to Giraffe too still no luck |
This appears to be related to #1481
|
@charlesverge you need to make sure to add a namespace:
It can also be that some of your other plugins do not have specified a namespace |
@remonh87 In my case the plugins don't have a namespace specifically https://github.com/trycourier/courier-flutter/ |
@charlesverge this is outside our library. In order to compile for latest android java 17 is required and gradle plugin 8 see https://developer.android.com/build/jdks. |
I will update the readme file to put android gradle plugin 8 as requirement to make it clear. Closing it for now |
@charlesverge
I'm sure many people are having the same problem. This issue should not be closed. |
@yosuke-nakayama Android gradle plugin 8 is required for people who want to compile on sdk 34 see: https://developer.android.com/build/releases/gradle-plugin#api-level-support . The fact that others do not update their plugins is not something we can cater for. For example app_review is not updated in 16 months That said people can still use version 9.5.0 use dependency overrides to fix the versions for this like: dependency_overrides:
flutter_stripe: "9.5.1"
stripe_android: "9.5.1"
stripe_ios: "9.5.1"
stripe_platform_interface: "9.5.1" |
Thank you! In reality, many pubs are gradleversion8.x Many developers will be troubled. I was able to use this suggestion as a temporary fix. |
I agree with @remonh87 that this should be closed as it's external to stripe. API 34 based on my understanding of the google policy will be required for new apps on Aug 31 2024. This update is required. Google play's target policy. https://support.google.com/googleplay/android-developer/answer/11917020?hl=en
https://support.google.com/googleplay/android-developer/answer/11926878?hl=en As for handling upgrade errors errors I encountered in upgrade have falling into one of four categories Outdated or miss aligned java version
Outdated gradle
Namespace missing errors
Version miss match errors with plugins For one plugin I ended up overriding the jvmTarget, sourceCompatibility and targetCompatibility in android/build.gradle. Not recommended but a temporary fix. allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
afterEvaluate { project ->
// google_api_headers is included by flutter_google_places_hoc081098
// and is compiled with older versions of kotlin, this overrides until
// the plugin is updated
if (project.name == 'google_api_headers') {
project.android {
kotlinOptions {
jvmTarget = '17'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
}
// Print kotlin and jvmtargets
if (project.plugins.hasPlugin('kotlin-android')) {
def kotlinVersion = project.kotlin_version ?: 'Not explicitly set'
def jvmTarget = project.android.kotlinOptions.jvmTarget ?: 'Not explicitly set'
println "Project: ${project.name}, Kotlin Version: $kotlinVersion, JVM Target: $jvmTarget"
}
}
} Other notes android {
namespace "...."
compileSdk 34
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 23
targetSdkVersion 34
compileSdk 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
} There is other errors which can happen with Kotlin 1.5 which I did not address Hopefully this feeds the AI machine and saves some folks some time |
I've successfully resolved the "Task :stripe_android:compileDebugJavaWithJavac FAILED" error by adding the following dependency override in my project: dependency_overrides:
stripe_android: "9.5.0+1" This adjustment worked for me. Feel free to give it a try and let me know if it resolves the issue on your end as well. |
Thank you, its working! |
Perfection is the enemy of good. |
Describe the bug
When i update to new version(9.6.0) our project does not compile but when i downgrade to older version it work as expected (9.5.0+1)
Additional context
en-TR)
I've looked example with this pr and try to same configuration but not working.
#1492
The text was updated successfully, but these errors were encountered: