Why the upgrade to Flutter v0.7.3 beta stopped my application from running?
Why the upgrade to Flutter v0.7.3 beta stopped my application from running?
I have upgraded my Flutter version from 0.5.1 beta to 0.7.3 beta as few plugins were not working properly and I was suggested to upgrade to latest, both plugins and flutter itself. But, this has completely destroyed the application as it won't even start. Below is the Android Studio Run console output
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.20/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.20/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuth.Plugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-1.0.2/android/src/main/java/io/flutter/plugins/firebase/storage/FirebaseStoragePlugin.java:293: warning: [unchecked] unchecked cast
Map<String, String> customMetadata = (Map<String, String>) map.get("customMetadata");
^
required: Map<String,String>
found: Object
1 warning
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker_multiple-0.0.2/android/src/main/java/com/ruiyu/imagepickermultiple/TransparentActivity.java uses unchecked or unsafe operations.`
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/apple/development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.5/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Built build/app/outputs/apk/debug/app-debug.apk.
Finished with error: NoSuchMethodError: The method 'allElements' was called on null.
Receiver: null
Tried calling: allElements("activity")
Below is the output from flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.7.3, on Mac OS X 10.13.6 17G65, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.1)
[✓] Connected devices (1 available)
! Doctor found issues in 1 category.
Process finished with exit code 0
I am sure the allElements() is not dart or flutter code. It's an inside Java code, means a plugin or Flutter itself is broken.
getAllElements()
allElements("activity")
@creativecreatorormaybenot yes now corrected.
– Vijay Kumar Kanta
Sep 16 '18 at 11:23
flutter clean
- just had this same problem today– njha
Sep 17 '18 at 2:46
flutter clean
@ReverseCold probably did that 100 times. Not the solution bro..
– Vijay Kumar Kanta
Sep 17 '18 at 4:25
1 Answer
1
I feel very embarrassed as it was my own doing which has brought this issue up. I finally fixed it by going to the Android manifest file and removed the offending
tools:replace="android:label"
which I had placed in the tag for whatever reason I don't know. Then I do..
flutter clean
Then Run the app works! Voila!
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
It does not say
getAllElements()
, butallElements("activity")
. However, I believe you are correct anyway.– creativecreatorormaybenot
Sep 16 '18 at 11:03