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

[1.5.4]'Uint16List' can't be assigned to the parameter type 'Int32List'. #126

Open
fantasy525 opened this issue Jul 12, 2019 · 8 comments
Open

Comments

@fantasy525
Copy link

  • Error:
 - 'Uint16List' is from 'dart:typed_data'.
 - 'Int32List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'Int32List'.
        indices: _indices, textureCoordinates: _uvBuffer);
$ flutter channel
Flutter channels:
  beta
  dev
  master
* stable

flutter doctor
$ flutter doctor -v
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.3 18D109, locale zh-Hans-CN)
    • Flutter version 1.5.4-hotfix.2 at /Users/bling-abc/program/flutter
    • Framework revision 7a4c33425d (2 months ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/bling-abc/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/bling-abc/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.1

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 34.0.2
    • Dart plugin version 183.5912.23

[✓] Connected device (1 available)
    • EML AL00 • CLB0219309002436 • android-arm64 • Android 9 (API 28)

• No issues found!


  • pubspec.yaml
  # flr
  flare_flutter: ^1.5.4
@juliengit2
Copy link

juliengit2 commented Jul 12, 2019

same issue, and very annoying.

using channel stable + flare_flutter: ^1.5.4 (as indicated in https://github.com/2d-inc/Flare-Flutter/#flutter-channel) doesn't work.

I tried to change the type but it didn't work, any idea??

@abymoen
Copy link

abymoen commented Jul 15, 2019

Also getting this, does anyone know the flare version that works?

Compiler message:
file:///C:/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.5.4/lib/flare.dart:1027:18: Error: The argument type 'Uint16List' can't be assigned to the parameter type 'Int32List'.
 - 'Uint16List' is from 'dart:typed_data'.
 - 'Int32List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'Int32List'.
        indices: _indices, textureCoordinates: _uvBuffer);
                 ^
Compiler failed on C:\Flutter\Projects\via_pinn\lib/main.dart
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.615], locale en-CA)
    • Flutter version 1.5.4-hotfix.2 at C:\Flutter\flutter
    • Framework revision 7a4c33425d (3 months ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

@luigi-rosso
Copy link
Contributor

It's a combination of the latest flutter stable (1.7.8+hotfix.3) and Flare 1.5.4. Both of those versions must be satisfied for the latest version of Flare and Flutter to work together (we strongly recommend you use these version).

It looks like you are using the old stable (v1.5.4-hotfix.2) which has a breaking change with Flutter 1.7.8+hotfix.3. Flare. Please upgrade to the latest Flutter stable.

@abymoen
Copy link

abymoen commented Jul 15, 2019

Yea was just about to comment that updating flutter seemed to work (run "flutter upgrade") and then use the stable flare tag still. But if that isn't an option 1.5.0 also worked (although I wouldn't recommend hard versioning ever). Thanks for the reply @luigi-rosso

@luigi-rosso
Copy link
Contributor

1.5.0 would work with the older Flutter stable 1.5.4-hotfix.2.

The cause of all of this is that Flutter changed the signature of a method Flare uses. This was a good change but it broke compatibility. If you use a version of Flutter with the old signature, you'll need to use a version of Flare that's <=1.5.3. If you're using the latest stable >=1.7.8+hotfix.3 then any flare_flutter >=1.5.4 will work.

In your case, flutter upgrade should get you up to the latest version. And then update your pubspec to flare_flutter: ^1.5.4 and call flutter pub get. That should get everything up to date!

@MustansirZia
Copy link

Well, shouldn't the latest version of Flutter (>=1.7.8+hotfix.3) be included in the environment section of the pubspec.yaml of this package? That shouldn't let us install the latest version of the package if we use an older Flutter version.

@luigi-rosso
Copy link
Contributor

That's awesome, I didn't realize that was configurable. Thanks for the suggestion!

@nt4f04uNd
Copy link

close it

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

6 participants