Unsatisfied version (jspdf) in stackblitz - stackblitz

When I try to install jspdf in stackblitz.com, its showing the below error.
Failure: Unsatisfied Version Range
Unable to resolve package
Please try installing a different version or range
Thank You
Bobbin

Related

Can anyone tell me what is this error in flutter when I am trying to add syncfusion_flutter_pdfviewer package

When I add syncfusion_flutter_pdfviewer package in yaml file I am getting the below error. can anyone tell me what is that error states ?
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.2.48-beta/lib/src/common/pdfviewer_plugin.dart:21:23: Error: Type 'Uint8List' not found.
CancelableOperation<Uint8List?>? _nativeImage;
^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.2.48-beta/lib/src/common/pdfviewer_plugin.dart:24:37: Error: Type 'Uint8List' not found.
After adding package, application should be compiled again.
Try running a command in terminal.
flutter run -d [device id]
UPDATE:
Also try to:
import 'dart:typed_data';
in a file where you are using syncfusion components.
The issue was also resolved for me by upgrading to the latest Flutter version (as of 22 October 2022).
Upgrade flutter to the latest version. This issue was solved after I upgraded to version 3.3.1.

Can't build after upgrading to Flutter 2.5.1

Once i upgraded to Flutter 2.5.1 my project stops build and run, giving this error:
/Users/admin/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_android-2.0.0/android/src/main/java/com/baseflow/geolocator/location/LocationMapper.java:29: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
^
symbol: variable S
location: class VERSION_CODES
/Users/admin/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_android-2.0.0/android/src/main/java/com/baseflow/geolocator/location/LocationMapper.java:30: error: cannot find symbol
position.put("is_mocked", location.isMock());
^
symbol: method isMock()
location: variable location of type Location
2 errors
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':geolocator_android:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Any idea?
You must have upgraded Geolocator to version 7.7.0, which means you will also need to update your android/app/build.gradle file and set the compileSdkVersion to 31 (it's mentioned in the CHANGELOG).
If you don't want to upgrade the Android compileSdkVersion you should downgrade the geolocator to version 7.6.2 in your pubspec.yaml.
The error is because the compileSdkVersion needs to be changed to 31 for Geolocator 7.7.0 and higher.
You could either do that in android/app/build.gradle file. But I wouldn't recommend it as it will cause more errors with other packages.
Instead, you could downgrade the Geolocator to 7.6.2 in the pubspec.yaml
Or use these commands to downgrade:
dart pub downgrade geolocator
Maybe your version is not upgraded with your packages
The following command will help you for that:
flutter pub get
I just Upgraded my project and got this issue:
Maybe this will work for you:
Run These commands in your terminal:
dart pub downgrade geolocator_android
dart pub downgrade geolocator
Another way is to set Compile and Target Android version to 31.
But I will not recommend it for now coz this will lead you to many other issues.

Error while running Flutter Web Project lib/generated_plugin_registrant.dart:16:3: Error: Getter not found: 'AnotherFlushbarPlugin'

I yesterday upgraded to Flutter 2.0.6 and when I added web support to an existing project I am getting this error
lib/generated_plugin_registrant.dart:16:3: Error: Getter not found: 'AnotherFlushbarPlugin'.
AnotherFlushbarPlugin.registerWith(registrar);
I am using a dependency Flushbar thought it might be due to that I removed that package run flutter clean but no use the error is still there
Fixed the issue there was package Flushbar code in the yaml file, I removed the line "another_flushbar": ^1.10.10 to fix the issue

flutter true time plugin not working with flutter build Error compilereleasejavawithjavac

This error is raised when I try to build APK and using flutter_true_time
could not determine the dependencies of task ':app:compilereleasejavawithjavac'.
> could not resolve all task dependencies for configuration ':app:releasecompileclasspath'.
> could not find com.github.instacart.truetime-android:library-extension-rx:3.4.
required by:
project :app > tv.orale.truetime:true_time_release:1.0
The plugin needs to be migrated with AndroidX and change compileSdkVersion to 28.
So I resolved it myself by forked it to my GitHub, change what it needs, and then use it in pub.yaml.
Anyone can add these line, and it will work.
true_time:
git: https://github.com/ShadyBoshra2012/flutter_true_time.git
Hope it helps someone.

How can I resolve conflicting support library version?

I'm making a flutter app.
I'm trying to use two plugins.
image_picker: 0.4.10
firebase_storage: 1.0.3
But I got this error.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
I understood It is a dependencies problem.
But these dependencies are written in plugin's build.gradle.
So if I fix the version string now, when I update plugin I will have same problem every time.
Do you know any good solution?
Thank you.