In android studio, Gradle sync Build model taking too long

Viewed 963

I'm new to android development and just installed android studio. It's the first time I'm opening studio. Gradle: Build model is taking long time. It's been already 50mins and still continuing and no message in console. I don't know what to do. Please help me.

enter image description here

1 Answers

Do you have a cloud_firestore package? If so, it usually adds to the build compilation time significantly. But you should provide more details - if its android emulator or iOS and your code. If its Firestore Cloud + iOS emulator

Improve iOS Build Times# Currently the Firestore iOS SDK depends on some 500k lines of mostly C++ code which can take upwards of 5 minutes to build in XCode. To reduce build times significantly, you can use a pre-compiled version by adding 1 line to your ios/Podfile inside your Flutter project;

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.6.0'

Add this line inside your target 'Runner' do block in your Podfile, e.g.:

 # ... target 'Runner' do   pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag
 => '8.6.0'
 # ... end 

Additionally, ensure that you have upgraded your cocoapods to 1.9.1 or higher: gem install cocoapods

For more information see this issue: https://github.com/FirebaseExtended/flutterfire/issues/2751

Related