2

I created a new flutter project. This is my pubspec.yaml file:

name: app_name
description: App Name

version: 1.0.0+1

environment:
  sdk: ">=2.16.1 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_bloc: ^7.3.1
  flutter_localizations:
    sdk: flutter
  get_it: ^7.1.3
  floor: ^1.2.0
  flutter_speed_dial: ^5.0.0+1

  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^1.0.0
  flutter_launcher_icons: ^0.9.2
  floor_generator: ^1.2.0
  build_runner: ^2.1.2

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/logo.png"

flutter:
  uses-material-design: true

  module:
    androidX: true
    androidPackage: com.example.appname
    iosBundleIdentifier: com.example.appname

When I run the following commands:

flutter pub get pod init pod install

The podfile is created, but only with the following contents:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Runner' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Runner

end

When I try to run the app, I get the following error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation

Anyone knows how I can fix this?

Apri
  • 1,241
  • 1
  • 8
  • 33

1 Answers1

1

First clear Derived data from preference and remove it from bin as well then use following commands

  1. flutter clean
  2. flutter pub get
  3. cd ios
  4. pod install
  5. pod update
Hardik Mehta
  • 2,195
  • 1
  • 11
  • 14