KiviCare (TM) Pharma Addon- Documentation
KiviCare (TM) Pharma Addon

Framework not found & Linker command failed with exit code 1

🕒 Estimated Reading: 1 minutes
📂 Location:
Common Errors → iOS errors → Framework not found & Linker command failed with exit code 1

framework not found flutter  
Linker command failed with exit code 1 (use -v to see invocation)

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

📄 Why does this error occur?

This error typically appears when:

  • Your Flutter SDK path is not set correctly on macOS.
  • There’s a mismatch between Flutter SDK versions in your global terminal and Android Studio terminal.
  • The Flutter framework is not found during the iOS build process.
  • Or Xcode’s iOS deployment target is incorrectly set.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Step-by-Step Solution

🔹 Step 1: Check Flutter SDK Version

First, verify your Flutter version:

  • Open Terminal on your Mac.
  • Run the command: flutter –version

Then open Android Studio’s terminal and run the same command. If both versions do not match, you need to set your Flutter SDK globally.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🔧 Set Flutter SDK Path Globally on macOS

1. Open Terminal

Use Spotlight (Cmd + Space) → Type Terminal → Open it.

2. Open Shell Profile for Editing
  • If using Bash:
    • nano ~/.bash_profile
  • If using Zsh (default on newer macOS):
    • nano ~/.zshrc
3. Add Flutter SDK Path

At the end of the file, add this line:

export PATH="$PATH:/path/to/flutter/bin"

Replace /path/to/flutter with the actual path where Flutter is installed on your system.

4. Save & Exit
  • Press Ctrl + O, then Enter to save
  • Press Ctrl + X to exit
5. Apply Changes: In the Terminal, run:
  • If using Bash:
    • source ~/.bash_profile
  • If using Zsh (default on newer macOS):
    • source ~/.zshrc
6. Confirm Setup
  flutter doctor --v

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🛠️ Set Flutter SDK Path in Android Studio on macOS

Follow these steps to set up the Flutter SDK path in Android Studio on macOS:

  1. Open Android Studio: Launch Android Studio on your Mac.
  2. Open Preferences:
    • Go to “Android Studio” in the menu bar.
    • Then, select “Preferences”.
  3. Access Flutter Settings:
    • In the left-hand pane, navigate to “Languages & Frameworks”.
    • Then, select “Flutter”.
  4. Set Flutter SDK Path:
    • Look for the “Flutter SDK path” field.
    • Click on the folder icon next to it.
    • Navigate to the directory where Flutter is installed on your system and select the Flutter SDK folder.
  5. Apply Changes: After selecting the Flutter SDK path, click “Apply” or “OK” to save the changes.
  6. Restart Android Studio: Close and reopen Android Studio for the changes to take effect.

After completing these steps, Android Studio will be configured to use the Flutter SDK from the specified path. This will enable you to create, edit, and run Flutter projects seamlessly within Android Studio on macOS.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🔄 Step 2: Clean & Rebuild Your Project

Run the following commands in your terminal (inside the project root folder):

flutter clean
rm -rf ios/Runner.xcworkspace
rm ios/Podfile.lock
flutter pub get
cd ios
pod install

if still issue is not fixed then move to the next step

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🔁 Step 3: Update Flutter SDK

If the issue persists:

  1. Download the latest stable Flutter SDK
    👉 Download Flutter SDK
  2. Replace your existing SDK with the downloaded one.
  3. Repeat Steps 1 & 2 after replacement.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Final Notes:

  • Always verify the correct SDK path in both Android Studio and terminal.

/ / / / / / / / / / / / / / / / / / / / / / / / / / / / /

If you encounter error given below

  • framework not found flutter
  • Linker command failed with exit code 1 (use -v to see invocation)

Before start please check your iOS deployment target in Xcode.

Step 1 – In Mac check flutter version in your global terminal and in Android studio’s terminal.

If not same then set Flutter SDK path for Global environment –

Setting up Flutter SDK Path Globally on macOS

1.Open Terminal: Launch the Terminal application. You can find it in the Applications folder or search for it using Spotlight (Cmd + Space, then type “Terminal”).

2. Edit Your Shell Profile:

  • For Bash:
nano ~/.bash_profile
  • For Zsh:
nano ~/.zshrc

3. Add Flutter SDK Path: Add the following line at the end of the file:

   export PATH="$PATH:/path/to/flutter/bin"

Replace /path/to/flutter with the actual path where Flutter is installed on your system.

4. Save Changes: Press Ctrl + O to save the file, then press Enter. Press Ctrl + X to exit the editor.

5. Apply Changes: In the Terminal, run:

  • For Bash:
source ~/.bash_profile
  • For Zsh:
source ~/.zshrc

6. Verify the Flutter version by running the command below –

  flutter doctor --v

Setting up Flutter SDK Path in Android Studio on macOS

Follow these steps to set up the Flutter SDK path in Android Studio on macOS:

  1. Open Android Studio: Launch Android Studio on your Mac.
  2. Open Preferences:
    • Go to “Android Studio” in the menu bar.
    • Then, select “Preferences”.
  3. Access Flutter Settings:
    • In the left-hand pane, navigate to “Languages & Frameworks”.
    • Then, select “Flutter”.
  4. Set Flutter SDK Path:
    • Look for the “Flutter SDK path” field.
    • Click on the folder icon next to it.
    • Navigate to the directory where Flutter is installed on your system and select the Flutter SDK folder.
  5. Apply Changes: After selecting the Flutter SDK path, click “Apply” or “OK” to save the changes.
  6. Restart Android Studio: Close and reopen Android Studio for the changes to take effect.

After completing these steps, Android Studio will be configured to use the Flutter SDK from the specified path. This will enable you to create, edit, and run Flutter projects seamlessly within Android Studio on macOS.

Step 2 – run this command in terminal

flutter clean; rm -rf Runner.xcworkspace; rm Podfile.lock; flutter pub get; pod install
if still issue is not fixed then move to the next step

If still issue is not fixed then move to the Step 3

Step 3 – Get the new Flutter SDK from the link below and replace it with you SDK.