japalekhin / langaw

A sample project for following along a tutorial found on jap.alekhin.io.
Other
109 stars 37 forks source link

Error at build ... #5

Open LucaGabi opened 4 years ago

LucaGabi commented 4 years ago

You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64. If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size. To generate an app bundle, run: flutter build appbundle --target-platform android-arm,android-arm64,android-x64 Learn more on: https://developer.android.com/guide/app-bundle To split the APKs per ABI, run: flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split [!] Your app isn't using AndroidX. To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.

Compiler message: /C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.0/lib/src/picture_provider.dart:335:20: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.

FAILURE: Build failed with an exception.

BUILD FAILED in 11s Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 11.6s Gradle task assembleRelease failed with exit code 1

LucaGabi commented 4 years ago

After change the packages to: flame: flutter_svg: ^0.17.3+1

App runs and I get a white screen ...

tjago commented 4 years ago

Hey @LucaGabi After updating Flame dependency try putting this in your main.dart file. This will fix your game.

void main() async { WidgetsFlutterBinding.ensureInitialized(); //extra line Util flameUtil = Util();