Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to compile Flutter application with Flutter 1.22.3

My application was compiling successfully until the Flutter version upgrade. I get the following error:

Runner.app/Info.plist does not exist. The Flutter "Thin Binary" build phase must run after "Copy Bundle Resources".

Flutter doctor -v

[✓] Flutter (Channel stable, 1.22.3, on Mac OS X 10.15.6 19G2021, locale fr-FR)
    • Flutter version 1.22.3 at /Users/xxx/development/flutter
    • Framework revision 8874f21e79 (3 days ago), 2020-10-29 14:14:35 -0700
    • Engine revision a1440ca392
    • Dart version 2.10.3

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/xxx/Library/Android/sdk
    • Platform android-R, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.10.0.rc.1
like image 899
fvisticot Avatar asked Nov 01 '20 21:11

fvisticot


4 Answers

I fixed it by running flutter clean (Make sure that If you renamed Runner to Runner.app, that this is also no longer a directory in the ios directory)

Then I rebuilt and it sprung back into action :)

like image 182
Spoetnic Avatar answered Oct 22 '22 12:10

Spoetnic


I was facing same issue, and fixed with following steps:

  1. Launch iOS application from Runner.Workspace
  2. Go to build phase --> Thin Binary
  3. Comment the shell script line.
  4. Run the app (it works, but app size grows to 161 MB)
  5. Now again uncomment same line in step 3. App builds and runs and app size shrinks to (97 MB)
like image 37
GDSM Avatar answered Oct 22 '22 13:10

GDSM


Solution


Go to Runner(target app) > Build Phases > Run Script and update the run script with the below one.

/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build

Also, verify that Runner(target app) > Build Phases > This Binary contains below scripts as suggested in XCode 11.4 Support by the flutter team.

/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" thin

For more information refer check question.

like image 20
Dhaval Kansara Avatar answered Oct 22 '22 12:10

Dhaval Kansara


Try renaming project name from Runner to Runner.app

It will rename the target as well to Runner.app.app, but the project will compile and run.

like image 1
Fernando Avatar answered Oct 22 '22 11:10

Fernando