Skip to content
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

How it works on flutter? #11

Open
heruijun opened this issue Jan 26, 2025 · 0 comments
Open

How it works on flutter? #11

heruijun opened this issue Jan 26, 2025 · 0 comments

Comments

@heruijun
Copy link

  1. I create flutter plugin,use command line.

flutter create --template=plugin --platforms=android,ios xendit_cards_plugin

  1. add build gradles。

dependencies {
implementation("com.xendit:cardsSdk:1.0.1")
}

I receviced some errors

Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform cardsSdk-debug.aar (com.xendit:cardsSdk-android-debug:1.0.1) to match attributes {artifactType=android-aar-metadata, com.android.build.api.attributes.BuildTypeAttr=debug, org.gradle.category=library, org.gradle.jvm.environment=android, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
> Execution failed for JetifyTransform: /Users/chagee/.gradle/caches/modules-2/files-2.1/com.xendit/cardsSdk-android-debug/1.0.1/5c3dfd2f3d264c4199be91e32f81d99c43278715/cardsSdk-debug.aar.
> Failed to transform '/Users/chagee/.gradle/caches/modules-2/files-2.1/com.xendit/cardsSdk-android-debug/1.0.1/5c3dfd2f3d264c4199be91e32f81d99c43278715/cardsSdk-debug.aar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 65. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 9s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using │
│ for Gradle. │
│ │
│ If you recently upgraded Android Studio, consult the migration guide at │
https://flutter.dev/to/java-gradle-incompatibility. │
│ │
│ Otherwise, to fix this issue, first, check the Java version used by Flutter by running flutter │ │ doctor --verbose. │
│ │
│ Then, update the Gradle version specified in │
│ /Users/chagee/FlutterCodes/xendit_cards_plugin/example/android/gradle/wrapper/gradle-wrapper.pro │
│ perties to be compatible with that Java version. See the link below for more information on │
│ compatible Java/Gradle versions: │
https://docs.gradle.org/current/userguide/compatibility.html#java
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant