-
-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.RuntimeException: Unable to destroy activity ... java.lang.NullPointerException #761
Comments
Hi your problem seems not location package Your issue seems following- Please check this. |
@xunreal75 Do you have any indication that this deprecation warning is related to the crash? I do not think it is. This warning shows up all the time when the app starts with no problem, as in
What crashes the app clearly is a NullPointerException, with a stack trace pointing to the location package. (Unless there is some weird interaction between the splash screen and the location package. On https://docs.flutter.dev/development/platform-integration/android/splash-screen-migration it says that a deprecated splash screen can cause a crash. Still, the stack trace to the location package would seem curious if the splash screen was the cause...) |
Sorry i Was on the wrong path The package seem orphahned at the moment. because the permissions state from locate is not clean when in use and always, I'm using package:permission_handler and following class. `import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; import '../generated/l10n.dart'; enum LocationPermissionStatus { class LocationPermissions { LocationPermissions(this.permissionStatus); class LocationPermissionDialog {
//unkown state Future requestAlwaysOnAndroid() async {
} Future getPermissionsStatus() async { Future requestAndOpenAppSettings() async { and in my locationprovider following code snippet `
} |
Hey! I got similar problem like you described. I managed to solve it putting additional permissions to
More about how to properly setup Android platform is available in the docs: https://docs.page/Lyokone/flutterlocation/installation/android#background-location |
Hey @matejhocevar, |
Any update on this? am still getting this error on prod. |
What I did was indeed to fix the deprecation warning of the splash screen as suggested by @xunreal75 . Cf. the instructions on https://docs.flutter.dev/development/platform-integration/android/splash-screen-migration. I haven't seen the problem since. However, since there was no definite way of reproduction for the crash, I am not sure that this solved the original issue. |
Please use the latest v5 version. This problem should be fixed in there. This problem also looks similar to #674. |
Description
App crashed on startup with the following message:
Steps To Reproduce
Unclear. In several attempts at starting the app anew there was no problem.
Tested on:
Seems to be similar or identical to #674
The text was updated successfully, but these errors were encountered: