razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
106 stars 147 forks source link

App not building razorpay creating issue #400

Closed mklgoell closed 1 month ago

mklgoell commented 1 month ago

Launching lib/main.dart on sdk gphone64 arm64 in debug mode... Running Gradle task 'assembleDebug'... Warning: 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.

BUILD FAILED in 26s Error: Gradle task assembleDebug failed with exit code 1

even I am using mavenCentral() but why this is showing me jcenter I won't get it

niladri-raychaudhuri commented 1 month ago

Same here

Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.razorpay:checkout:1.6.+.
     Required by:
         project :app > project :razorpay_flutter
      > Failed to list versions for com.razorpay:checkout.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/razorpay/checkout/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/com/razorpay/checkout/maven-metadata.xml'. Received status code 500 from server: Internal Server Error

* 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 49s

Flutter doctor log

[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-x64, locale en-IN)
    • Flutter version 3.22.2 on channel stable at /Users/******/Documents/work/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (10 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/*******/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)

[✓] VS Code (version 1.92.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.95.20240801
Mohit2304xc commented 1 month ago

same for me also

isagardb commented 1 month ago

Same issue

spn23 commented 1 month ago

Launching lib/main.dart on sdk gphone64 arm64 in debug mode... Running Gradle task 'assembleDebug'... Warning: 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'. Could not resolve com.razorpay:checkout:1.6.+. Required by: project :app > project :razorpay_flutter

Failed to list versions for com.razorpay:checkout. Unable to load Maven meta-data from https://jcenter.bintray.com/com/razorpay/checkout/maven-metadata.xml. Could not GET 'https://jcenter.bintray.com/com/razorpay/checkout/maven-metadata.xml'. Received status code 500 from server: Internal Server Error

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 26s Error: Gradle task assembleDebug failed with exit code 1

theatulverma1 commented 1 month ago

Same issue here.

FAILURE: Build failed with an exception.

BUILD FAILED in 3m 28s Running Gradle task 'bundleRelease'... 209.2s Gradle task bundleRelease failed with exit code 1

AnsarILeaf commented 1 month ago

Same issue

wrteam-priyansh commented 1 month ago

Same issue

anilthapa1939 commented 1 month ago

same issue here

HarshuPatel007 commented 1 month ago

Same issue

mrrathod0007 commented 1 month ago

same issue

raaja-guidely commented 1 month ago

Please fix this issue soon. im unable to run the project

Abhijeet11187 commented 1 month ago

Same issue unable to run the project

ABHINANDRK commented 1 month ago

same issue

niladri-raychaudhuri commented 1 month ago

As per fix done by @lesonlhld

As a temporary fix, could try updating the pub-cache file, till the fix is available .pub-cache/hosted/pub.dev/razorpay_flutter-1.3.7/android/build.gradle

Under dependencies, change api 'com.razorpay:checkout:1.6.+' api 'com.razorpay:checkout:1.6.41'

This has worked for me

android {
    compileSdkVersion 34
   namespace 'com.razorpay.razorpay_flutter'
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 34
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        api 'com.razorpay:checkout:1.6.41'
    }
}

Remember to run flutter clean and rebuild after the change.

mrrathod0007 commented 1 month ago

@niladri-raychaudhuri https://github.com/razorpay/razorpay-flutter/issues/400#issuecomment-2285365867 It is work Thanks for the suggestion

HarshuPatel007 commented 1 month ago

implementation fileTree(dir: 'libs', include: ['*.jar']) api 'com.razorpay:checkout:1.6.41

Hello @niladri-raychaudhuri We have tried but didn't work for me.

AnsarILeaf commented 1 month ago

@HarshuPatel007

You can update Pubspec.yaml like following to use @lesonlhld fix

razorpay_flutter: git: url: https://github.com/inspireui/razorpay-flutter ref: fa9bf362df2bc54c446459fe67169926317580be

vivekshindhe commented 1 month ago

Hey folks, the issue is not with the razorpay-checkout SDK but with mavenCentral. The razorpay-flutter package does not use jcenter. You can verify this here. Also attaching the link to the site which states the outage in OSSRH (mavenCentral) which is why we are seeing this issue. The issue is also different for each because using a specific version has been working for some folks, while it hasn’t for others. You can try to use this (Thank you @niladri-raychaudhuri for explaining the steps) fix temporarily to see if that would resolve it for you, while we look into resolving this from our end.

wrteam-vimal commented 1 month ago

Same issue here

murali-cse commented 1 month ago

@HarshuPatel007

You can update Pubspec.yaml like following to use @lesonlhld fix

razorpay_flutter: git: url: https://github.com/inspireui/razorpay-flutter ref: fa9bf36

Thanks! It's working.

wrteam-vimal commented 1 month ago

Same issue here

amit-mariox commented 1 month ago

same for me

amit-mariox commented 1 month ago

@HarshuPatel007

You can update Pubspec.yaml like following to use @lesonlhld fix

razorpay_flutter: git: url: https://github.com/inspireui/razorpay-flutter ref: fa9bf36

It is not worked for me Giving same error

chungxon commented 1 month ago

@HarshuPatel007

You can update Pubspec.yaml like following to use @lesonlhld fix

razorpay_flutter: git: url: https://github.com/inspireui/razorpay-flutter ref: fa9bf36

Hi guys,

Thanks so much for using my solution! Just a note that this is a temporary fix on my forked repo, so please follow https://github.com/razorpay/razorpay-flutter/issues/400#issuecomment-2285365867 instead until the author addresses this on their end 😉

vivekshindhe commented 1 month ago

Hey folks, seems like the issue on mavenCentral is resolved. You can check the latest status here. Please try to run ./gradlew --refresh-dependencies or ./gradle --refresh-dependencies or run Sync project with Gradle files in Android studio when the android project is opened.

abhijit-hl commented 1 month ago

Guys, No need to update dependency in pub-cache as the outage in mavenCentral is restored now. you can try to rebuild again , It will work

AnsarILeaf commented 1 month ago

Hey folks, seems like the issue on mavenCentral is resolved. You can check the latest status here. Please try to run ./gradlew --refresh-dependencies or ./gradle --refresh-dependencies or run Sync project with Gradle files in Android studio when the android project is opened.

Fixed

mklgoell commented 1 month ago

It's working fine completely now That issues was because of mavenCentral outage which is restored now. So I'm closing this issue