Lunari8546
Lunari8546

Reputation: 7

Can't run the flutter app after added firebase-core and auth to the project

Here's the error in console, plus flutter doctor didn't showed any error. I've tried upgraded the android sdk to 28, check build.gradle. It still don't work and I have no clue.

Error

Pubspec.yaml

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  google_fonts: ^1.1.1
  path_provider: ^1.6.24
  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
    sdk: flutter

Upvotes: 0

Views: 599

Answers (2)

Sergio Moreno
Sergio Moreno

Reputation: 65

1- Move them to dependencies

2- Leave a space at the beggining of the dependencie name like so:

dependencies:
  flutter:
    sdk: flutter
    
  firebase_core: ^0.5.1
  firebase_auth: ^0.18.2
  google_fonts: ^1.1.0
  provider: ^4.3.2+2

If you realize, it's like if flutter and the rest of your dependencies were at the same level

Upvotes: 2

xbadal
xbadal

Reputation: 1375

Its AAPT issue; Open this open C:\Users\user\Desktop\Projects\Flutter\eLesson\android\app\src\main\AndroidManifest.xml and remove style/Theme.AppCompat.Light.NoActionBar

and your App or some of you plugin is not compatible to AndroidX. Open android folder of your project in separate Android Studio. Right click on Project->Refactor->Migrate to AndroidX.

Repeat this process for each of your plugin folder.

Clean and Rebuild.

Enjoy.

Upvotes: 0

Related Questions