Chuyển đến nội dung chính

Bài đăng

A bug in Flutter video plugin: D8: Invoke-customs are only supported starting with Android O (--min-api 26)

Fix it by add this block to android/app/build.gradle     compileOptions {         sourceCompatibility 1.8         targetCompatibility 1.8     }
Các bài đăng gần đây

The bug: A package may not list itself as a dependency

If you named your app with the same name as any packages in pubspec.yaml. When running: $ flutter packages get You will have the bug: "A package may not list itself as a dependency" For example, I created an app named firebase_messaging and in pubspec.yaml I also included the package named firebase_messaging To fix this, you have to change the name of your app.

How to fix the bug: flutter app crash on released mode but work fine in debug mode.

When developing a Flutter application, I faced a weird bug. The app could run on debug mode and even when I used the command line: flutter run --release, the app worked fine. But when I tried compiling it by flutter build apk (flutter build ios) then flutter install, the crashed immediately when starting. Finally, I discovered it was because  the device was running 64-bit version of flutter/dart vm, while my app was targeting 32-bit version. I fixed by adding:  defaultConfig { ... ndk { abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'armeabi-v8a', 'armeabi' } } To /app/build.gradle