Reputation: 91
I am trying to compile my app in flutter, but when I do it, I get the following error in the console.
I tried running flutter clean
and then flutter pub get
but it doesn't seem to work
Warning: elemento inesperado (URI:"", local:"base-extension"). Los elementos esperados son <{}codename>,<{}layoutlib>,<{}api-level>
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/lib/src/firebase_app.dart:18:25: Error: Member not found: 'FirebaseAppPlatform.verifyExtends'.
FirebaseAppPlatform.verifyExtends(_delegate);
^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 4m 16s
Running Gradle task 'assembleRelease'... 262.0s
Gradle task assembleRelease failed with exit code 1
``
I tried running flutter clean and then flutter pub get but it doesn't seem to work
Upvotes: 4
Views: 12485
Reputation: 1
Navigate to the dependencies section in your pubspec.yaml file and click on 'pub upgrade'. The terminal will display the latest versions of your dependencies. Update your
Firebase
packages to these new versions. I have tried it, and it works for me.
DragonForce Fan 87
Upvotes: 0
Reputation: 446
Try this:
Close project.
Go to project repository folder.
Delete all generated files, for example:
Open Android Studio again
Go to File->Invalidate Caches/Restart, then invalidate caches and restart
if your project structure is corrupted go to: File -> Close Project, close project and reopen it, it should be back to normal.
flutter pub get
dart pub get
Upvotes: 0
Reputation: 1
Go to dependencies in pubspec.yaml and click on 'pub upgrade' ... the last versions of dependencies will appear in terminal ... increase your firebase packages to the new versions ... I try it and it works with me
This answer work with me too.
Upvotes: -1
Reputation: 31
Go to dependencies in pubspec.yaml
and click on 'pub upgrade' ... the last versions of dependencies will appear in terminal ... increase your firebase packages to the new versions ... I try it and it works with me.
Upvotes: 3
Reputation: 671
According to this - https://github.com/firebase/flutterfire/issues/9814 it's a problem with dependencies.
In my case I have first added old firebase_core dependencies and then overridden them to newest ones, but Android Studio did not delete old dependencies. I have deleted the build folder from the main project folder, then I downloaded dependencies again in pubspec.yaml and code started working.
Upvotes: 0