Unable to compile Flutter application with Flutter 1.22.3
Asked Answered
R

7

10

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
Raby answered 1/11, 2020 at 21:0 Comment(1)
I have same issue with 1.22.2Reprobative
B
12

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 :)

Boob answered 13/11, 2020 at 11:46 Comment(0)
S
9

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)
Spew answered 22/11, 2020 at 7:51 Comment(1)
Worked for me as well! ThanksBarnette
B
2

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.

Botanomancy answered 24/12, 2020 at 8:34 Comment(0)
S
1

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.

Steelworks answered 6/11, 2020 at 0:42 Comment(0)
L
0

We have the same issue a lot on our project. Unfortunately we were not yet able to fix it completely but we have a work around:

Go to the folder where the build files are stored

e.g. /Users/your.name/Projects/app_project/build/ios/iphonesimulator/YourApp.app)

Open the app with right click -> Show Package Content. And then just copy the old info.plist from an earlier build into this app package. The App should build again.

Lizalizabeth answered 2/11, 2020 at 12:51 Comment(0)
R
0

I found the issue. To fix it:

  • Open XCode
  • Open the Build Phase panel
  • In the Run Script i remove the second line of the script (I keep only the following line: /bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build)
Raby answered 2/11, 2020 at 21:20 Comment(2)
what caused this?Frizette
perhaps a script needed in a previous Flutter version ? not sure ...Raby
L
0

I met the same problem. I have solved this problem to change the edition of flutter into "flutter_macos_1.17.2-stable". My English is bad.Forgive me

Lesser answered 23/1, 2021 at 18:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.