razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
107 stars 147 forks source link

Current version of the plugin is not compitable with package_info_plus plugin #324

Closed imijanur closed 1 year ago

imijanur commented 1 year ago

I am getting error while running pub get on pubspec.yaml file

it is giving error Because razorpay_flutter >=1.3.3 depends on package_info_plus ^1.3.0 and bt_universal depends on package_info_plus ^4.0.0, razorpay_flutter >=1.3.3 is forbidden. So, because bt_universal depends on razorpay_flutter 1.3.4, version solving failed.

previously I was able to run the project downgrading the package_info_plus plugin to version 1.3.0 but that version is facing error after dart version upgrade and flutter upgrade, please upgrade your dependencies to support latest versions

I am getting bellow errors while using lower version of package_info_plus: ^1.3.0 plugin

Launching lib\main.dart on sdk gphone x86 64 in debug mode... Running Gradle task 'assembleDebug'... ../../AppData/Local/Pub/Cache/hosted/pub.dev/package_info_plus_windows-2.1.0/lib/src/file_version_info.dart:13:17: Error: Field 'wLanguage' cannot be nullable or have type 'Null', it must beint,double,Pointer, or a subtype ofStructorUnion. external int? wLanguage; ^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/package_info_plus_windows-2.1.0/lib/src/file_version_info.dart:16:17: Error: Field 'wCodePage' cannot be nullable or have type 'Null', it must beint,double,Pointer, or a subtype ofStructorUnion`. external int? wCodePage; ^ Target kernel_snapshot failed: Exception

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 29s Exception: Gradle task assembleDebug failed with exit code 1 `

Please upgrade your dependencies

fareesh commented 1 year ago

+1

jeeldev9 commented 1 year ago

also i am facing this issue any solution.

imijanur commented 1 year ago

also i am facing this issue any solution.

no update from razorpay yet

imsamgarg commented 1 year ago

For now you can add dependency_overrides in your pubspec.yaml file

dependency_overrides:
  razorpay_flutter:
    git: 
      url: https://github.com/indprtech/razorpay-flutter
      ref: patch-1

Note: This is not my repo i just copy it from one of the pull request.

imijanur commented 1 year ago

For now you can add dependency_overrides in your pubspec.yaml file

dependency_overrides:
  razorpay_flutter:
    git: 
      url: https://github.com/indprtech/razorpay-flutter
      ref: patch-1

Note: This is not my repo i just copy it from one of the pull request.

I know there is a few pull request with proper modification but I am not convinced to use unofficial repositories for production applications, I will prefer to wait for the update from razorpay

imsamgarg commented 1 year ago

I know there is a few pull request with proper modification but I am not convinced to use unofficial repositories for production applications, I will prefer to wait for the update from razorpay

That's fine. I just shared it in case of someone needs a quick fix.

ajay-zartek commented 1 year ago

+1

quvi-dev commented 1 year ago

+1

sarankumar-ns commented 1 year ago

+1

utrayn commented 1 year ago

+1

I'm facing the same issue with 2 of my apps.

kali-rls commented 1 year ago

+1

pawankumar-creator commented 1 year ago

I also got the same issue here. flutter pub get Resolving dependencies... Because razorpay_flutter 1.3.4 depends on package_info_plus ^1.3.0 and no versions of razorpay_flutter match >1.3.4 <2.0.0, razorpay_flutter ^1.3.4 requires package_info_plus ^1.3.0. So, because my_project depends on both razorpay_flutter ^1.3.4 and package_info_plus ^4.0.1, version solving failed. exit code 1

PITPL-Maulik-Sinroja commented 1 year ago

+1 also facing the same issue.

julkaar9 commented 1 year ago

+1 same issue

pawankumar-creator commented 1 year ago

You can try overriding the dependency in pubspec.yaml until the issue is resolved

dependencies:package_info_plus: ^3.0.0

dependency_overrides: package_info_plus: 3.0.0

yet the latest version is 4.0.1+ but it's also having compatibility issue with wakelock. anyway it's work on my machine.

patthipati commented 1 year ago

+1 same issue

imijanur commented 1 year ago

Got the update but getting incompitable issue with wakelock its a dependency of chewie, wakelock has no update from 10 months