Hem*_*man 4 android visual-studio flutter kali-linux
我正在尝试在 kali linux 机器上安装 flutter。我从官方网站安装了flutter并进行了相应操作。我不想使用 android studio,所以我使用 Visual Studio 代码。
\n当我在终端运行 Flutter doctor 时,我得到
[\xe2\x9c\x93] Flutter (Channel master, 2.2.0-11.0.pre.161, on Linux, locale en_IN)\n[\xe2\x9c\x97] Android toolchain - develop for Android devices\n \xe2\x9c\x97 Unable to locate Android SDK.\n Install Android Studio from: https://developer.android.com/studio/index.html\n On first launch it will assist you in installing the Android SDK components.\n (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).\n If the Android SDK has been installed to a custom location, please use\n `flutter config --android-sdk` to update to that location.\n\n[\xe2\x9c\x97] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)\n ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.\n[\xe2\x98\xa0] Linux toolchain - develop for Linux desktop (the doctor check crashed)\n \xe2\x9c\x97 Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at\n https://github.com/flutter/flutter/issues.\n \xe2\x9c\x97 ProcessException: Failed to find "ninja" in the search path.\n Command: ninja \n[!] Android Studio (not installed)\n[\xe2\x9c\x93] VS Code (version 1.55.2)\n[\xe2\x9c\x93] Connected device (1 available)\n\n! Doctor found issues in 4 categories.\n
Run Code Online (Sandbox Code Playgroud)\n当我在视觉工作室中运行时我得到了这个
\nLaunching lib/main.dart on Linux in debug mode...\nlib/main.dart:1\nCMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.\nCMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage\nException: Unable to generate build files\nExited (sigterm)\n
Run Code Online (Sandbox Code Playgroud)\n任何人都可以帮我解决这个问题吗?
\nHem*_*man 16
我通过使用以下命令找到了解决方案:
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
Run Code Online (Sandbox Code Playgroud)
和
flutter config --enable-linux-desktop
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6695 次 |
最近记录: |