When I create a new Flutter project in Android Studio (Android Studio Electric Eel | 2022.1.1), I build an APK and run it on the android emulator with no problem, but when I try to run it on linux I get this error:
CMake Error at /usr/share/cmake-3.25/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
Could not find compiler set in environment variable CXX:
clang++.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Exception: Unable to generate build files
My system (Pop!_OS 22.04 LTS) doesn't have that version of CMake installed, it has /usr/share/cmake-3.22 installed
And in Android Studio settings, under System Settings -> Android SDK -> SDK Tools, CMake 3.22.1 is installed
I am not able to figure out how to adjust the CMake version in Android Studio and what is the correct solution. Please any ideas?
clang++compiler in the system. You could whether installclang++or setCMAKE_CXX_COMPILERto an available compiler (e.g.g++).clang++from a command line?