paddy708
paddy708

Reputation: 113

Flutter: Cant build app anymore since upgrade flutter and channel

Please help me! The app was close to be finished and since I did run flutter upgrade to solve a bug I had to run: flutter clean flutter channel master flutter upgrade flutter run

and now its not starting anymore and the following code shows up..

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                            7,6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/patrickmeyer/AndroidStudioProjects/my_fitness_challenge/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m:140:55: error: 'currentRadioAccessTechnology' is deprecated: first deprecated in iOS 12.0 [-Werror,-Wdeprecated-declarations]
        networkCurrentRadioAccessTechnology = networkInfo.currentRadioAccessTechnology;
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                          serviceCurrentRadioAccessTechnology
    In module 'CoreTelephony' imported from /Users/patrickmeyer/AndroidStudioProjects/my_fitness_challenge/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORPlatform.h:32:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h:154:61: note: 'currentRadioAccessTechnology' has been explicitly marked deprecated here
    @property (nonatomic, readonly, retain, nullable) NSString* currentRadioAccessTechnology API_DEPRECATED_WITH_REPLACEMENT("serviceCurrentRadioAccessTechnology", ios(7.0, 12.0)) API_UNAVAILABLE(macos);
                                                                ^
    1 error generated.
    PromisesObjC-crewhghtjvlepwbqltmbxkeqlsao
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

My flutter doctor looks good...

[✓] Flutter (Channel master, 1.26.0-2.0.pre.117, on Mac OS X 10.15.7 19H114 darwin-x64, locale de-DE) • Flutter version 1.26.0-2.0.pre.117 at /Users/patrickmeyer/Developer/flutter • Framework revision 15c009b805 (17 hours ago), 2020-12-22 20:09:03 -0500 • Engine revision b7cd3f8e70 • Dart version 2.12.0 (build 2.12.0-173.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at /Users/patrickmeyer/Library/Android/sdk • Platform android-29, build-tools 29.0.3 • 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-6915495) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.3, Build version 12C33 • CocoaPods version 1.10.0

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (2 available) • iPhone 12 Pro Max (mobile) • 11ACA273-A0C3-405D-993A-A9AF9057887C • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator) • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88

• No issues found!

Upvotes: 2

Views: 1509

Answers (3)

LiveRock
LiveRock

Reputation: 1033

It looks like a compatibility issue.

Google "CoreTelephony" and "currentRadioAccessTechnology"

Upvotes: 0

Rudresh Narwal
Rudresh Narwal

Reputation: 3100

You can indeed use

flutter create . 

to "repair" the current project to a limited degree. If the ios/ or android/ folders are missing, they are created. You can use this to switch native language Java/Kotlin, ObjC/Swift or to get the generated files updated to match newer Flutter versions by deleting the directories and running

flutter create . [options]

You need to re-apply previously made manual changes yourself though.

Upvotes: 0

jeugene
jeugene

Reputation: 231

This could be because of compatible issues between flutter and Xcode version. Switch to the previous version and see if the error is there. Try other versions of flutter manually, using flutter version .

You can also run the program from Xcode, and try opening the emulator from there.

Upvotes: 0

Related Questions