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

Latest Flutter master(Dart 2.3 ??) breaking flare #75

Closed
rahulmanthena opened this issue Apr 23, 2019 · 12 comments
Closed

Latest Flutter master(Dart 2.3 ??) breaking flare #75

rahulmanthena opened this issue Apr 23, 2019 · 12 comments

Comments

@rahulmanthena
Copy link

Hi

I am getting the following error on latest flutter master branch, my hunch is that this is related the dart 2.3 update. Working fine on Stable channel

Compiler message:
file:///Users/rahul/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.3.13/lib/flare.dart:981:18: Error: The argument type 'Int32List' can't be assigned to the parameter type 'Uint16List'.

  • 'Int32List' is from 'dart:typed_data'.
  • 'Uint16List' is from 'dart:typed_data'.
    Try changing the type of the parameter, or casting the argument to 'Uint16List'.
    indices: _indices, textureCoordinates: _uvBuffer);
    ^
    Compiler failed on /Users/rahul/Development/AndroidStudioProjects/scrim/lib/main.dart
    Finished with error: Gradle task assembleDevelopmentDebug failed with exit code 1

Flutter version:
Flutter 1.5.5-pre.19 • channel master • https://github.com/flutter/flutter.git
Framework • revision ac7f875778 (2 hours ago) • 2019-04-22 21:41:18 -0400
Engine • revision 0523870e0b
Tools • Dart 2.3.0 (build 2.3.0-dev.0.1 cf4444b803)

@Zazo032
Copy link

Zazo032 commented Apr 23, 2019

Locally changing line 914 to Uint16List _indices; and line 975 to Uint16List.fromList(triangles); temporarily solves the issue and allows you to run the app, even though it may not be the best solution (not familiar with Flare data).

@umberto-sonnino
Copy link
Contributor

It looks like the latest Flutter master has changed the Vertices.raw() constructor type for the indices parameter, but Flutter stable still relies on the old signature.

In the meantime @Zazo032's temporary fix works, but we'll be updating everything asap!

@malnafei
Copy link

malnafei commented May 1, 2019

Is this issue solved?
I try it with Flutter master and flare_flutter: ^1.5.0 but still getting errors:

Compiler message:
file:///Users/example/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.5.0/lib/flare.dart:1023:18: Error: The argument type 'Int32List' can't be
assigned to the parameter type 'Uint16List'.
 - 'Int32List' is from 'dart:typed_data'.
 - 'Uint16List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'Uint16List'.
        indices: _indices, textureCoordinates: _uvBuffer);
                 ^
Compiler failed on /Users/example/Desktop/coding/flutter-flare/flare/lib/main.dart
Error launching application on iPhone Xʀ.

Flutter Doctor - v:

[✓] Flutter (Channel master, v1.5.9-pre.86, on Mac OS X 10.14.4 18E226, locale en-US)
    • Flutter version 1.5.9-pre.86 at /Users/ex/flutter
    • Framework revision a8504405a8 (5 hours ago), 2019-04-30 23:27:30 -0700
    • Engine revision 2f11d3c4a2
    • Dart version 2.3.0 (build 2.3.0-dev.0.4 c46deebfb6)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/ex/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • 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-1136-b06)
    • 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.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.33.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.25.1

[✓] Connected device (1 available)
    • iPhone Xʀ • 6BA67AB4-AB37-4C1C-8EA3-D69EC44E4B6A • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)

! Doctor found issues in 1 category.

@umberto-sonnino
Copy link
Contributor

We've been making a few updates to the runtime in order to have better support for these changes in the Flutter APIs.
Using this repo's stable branch together with Flutter Stable should work!

@luigi-rosso
Copy link
Contributor

Now that these changes have landed in flutter dev, you can use either our master or dev channel if you are using non-stable version of flutter:

flare_flutter:
  git: 
    url: git://github.com/2d-inc/Flare-Flutter.git
    ref: dev
    path: flare_flutter

@truongsinh
Copy link

1.7.8-hotfix.2 is now stable, we need to fix this in the stable version of flare as well

@luigi-rosso
Copy link
Contributor

luigi-rosso commented Jul 9, 2019

We already updated flare_flutter for this yesterday! Please update your flare_flutter dependency in pubspec.yaml to ^1.5.4 and run pub get.

@truongsinh
Copy link

@luigi-rosso can you also check 2d-inc/Nima-Flutter#16, because it's a blocker for https://github.com/flutter/slideplayer/pull/8

@luigi-rosso
Copy link
Contributor

Yes, I’ll take a look at this today!

@truongsinh
Copy link

Should this ticket be closed then?

@luigi-rosso
Copy link
Contributor

Closing this issue. If you still see this, you’re likely on an old flutter or flare version. Make sure to update flare_flutter to 1.5.4 and run flutter upgrade on flutter channel stable.

@MannyDiera
Copy link

MannyDiera commented Jul 15, 2019

@luigi-rosso Had the same issue, followed the instructions above and was fixed.
For all others running into this issue.
1.- Add flare_flutter: ^1.5.4 in pubspec.yaml file.
2.- Run 'flutter upgrade'
3.- Profit
Thanks!

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

7 participants