google / charts

https://pub.dev/packages/charts_flutter
Apache License 2.0
2.8k stars 1.2k forks source link

running the examples? #705

Open chrisvidal opened 2 years ago

chrisvidal commented 2 years ago

anyone managed to run the examples?

I cant build the example app

Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
Launching lib/main.dart on iPhone 13 in debug mode...
lib/main.dart:1
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Xcode build done.                                            8.4s
Build succeeded but the expected app at /Users/christophevidal/Mobiles/Packages/charts/charts_flutter/example/build/ios/Debug-iphonesimulator/Runner.app not found
Could not find the built application bundle at build/ios/iphonesimulator/Runner.app.
Error launching application on iPhone 13.
zeqinjie commented 2 years ago

+1 how to solve

gmlewis commented 2 years ago

Here's what I did, which seemed to work just fine:

$ git clone git@github.com:google/charts
$ cd charts/charts_flutter/example
$ flutter create .
$ flutter runMultiple devices found:
Linux (desktop) • linux  • linux-x64      • Linux Mint 19.3 5.4.0-91-generic
Chrome (web)    • chrome • web-javascript • Google Chrome 97.0.4692.71
[1]: Linux (linux)
[2]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 2

Here's the version of Flutter I'm using:

$ flutter doctor
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,
the v1 Android embedding will be removed in future versions of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The detected reason was:

  /home/glenn/src/flutter/github.com/google/charts/charts_flutter/example/android/app/src/main/AndroidMan
  ifest.xml uses `android:name="io.flutter.app.FutterApplication"`
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, 2.9.0-0.1.pre, on Linux Mint 19.3 5.4.0-91-generic, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed
      instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2021.2)
[✓] VS Code (version 1.63.2)
[✓] Connected device (2 available)

! Doctor found issues in 2 categories.