FlutterGL / flutter_web_gl

WebGL Texture plugin for Flutter
Other
109 stars 15 forks source link

I get errors in console when I try to run the app on android emulator #15

Open ghost opened 2 years ago

ghost commented 2 years ago

Hi when I try to run my app with the package I get this error

PS G:\dev\george35mk\Flutter\game_engine2> flutter run
Using hardware rendering with device sdk gphone x86 arm. If you notice graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 arm in debug mode...
/G:/Programs/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.2.0-nullsafety.1/lib/src/utf8.dart:68:33: Error: The getter 'addressOf' isn't defined for the class 'Utf8'.
 - 'Utf8' is from 'package:ffi/src/utf8.dart' ('/G:/Programs/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.2.0-nullsafety.1/lib/src/utf8.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
  String toString() => fromUtf8(addressOf);
                                ^^^^^^^^^
Running Gradle task 'assembleDebug'...   

OS: Windows 10

flutter:

Flutter 2.3.0-24.0.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision 2b9537c783 (3 months ago) • 2021-06-11 22:11:53 -0700
Engine • revision ddbac024d1
Tools • Dart 2.14.0 (build 2.14.0-188.0.dev)

I run the exact code you have provided in the pub.dev https://pub.dev/packages/flutter_web_gl/example

nilsdoehring commented 2 years ago

While I'm not a developer of this library, I'm noticing you have ffi-0.2.0 while the repo has ffi: ^1.0.0 in its pubspec. Might it be that you are somehow using an older version of the library? Maybe try explicitly pointing to the github repo in the example's pubspec:

  flutter_web_gl:
    git: https://github.com/FlutterGL/flutter_web_gl/

The example does compile on my machine, but I'm encountering emulator runtime issues: #13