-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
Crash on app start #117
Comments
I get this error on the console:
|
Same problem here: This is my logcat
and this is my flutter doctor `[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Versión 10.0.17763.253], locale es-419) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] VS Code, 64-bit edition (version 1.31.0) [√] Connected device (1 available) • No issues found! |
Hey ! I will check this issue during the weekend and keep you guys updated 👍 |
Facing a similar issue
|
Also a similar issue here. The first time (after installing the plugin), I'm getting a silent-crash (only in logs):
as referenced here: #18 if I perform clean and rerun get packages, I get an actual crash:
Any updates regarding this? |
Facing same issue ,........ |
I am facing an issue too. I think it is due to the android support library and androidx transition.
flutter doctor
pubspec.yaml
|
The problem is caused by the changing to AndroidX and SDK 28. I have gone back to version 1.4.1 and that works fine. I don't need any of the 2.0 changes at this point. |
any solution yet? |
Hey ! I've found a partial solution, this seems to be a problem with gradlew:
Hope it will help you, let me know ! EDIT: |
Okay finally found it, you have to make sure that your gradle.properties file contains this in order to have everything working with AndroidX:
Please also make sure that you have those dependencies in your build.gradle:
I'll update the README this evening if I have some confirmations that it is working :) |
Yes, it is working fine, in my case I have to update in app\build.gradle below the line. compileSdkVersion 28 |
Hi Lyokone Please update read.me. Below code is not working in updated version. var currentLocation = <String, double>{}; var location = new Location(); // Platform messages may fail, so we use a try/catch PlatformException. Errors:-
Thanks |
noticed the same, any solution? |
My is throwing this error Launching lib/main.dart on SM G3556D in debug mode... FAILURE: Build failed with an exception.
BUILD FAILED in 54s Gradle task 'assembleDebug'... Done 56.8s |
Changes have been updated in the docs. I have made it clearer here |
Changes have been updated in the docs. I have made it clearer here |
have the same issue. the docs are quite outdated too.. |
@yevgeniaronov follow this and check if it works for you #124 (comment) |
I close this. Thank you to everyone who has been helping :) |
The problem arises now with 2.3.3. When reverting back to 2.3.2, the problem goes away and the app does not crash on start. |
Trace for 2.3.3:
Minimum and target SDK is set to 28. Yes, the gradle.properties file contains the following:
|
Same issues here
|
Hey ! Thanks for bringing that, I'll check as soon as possible. |
Hey, can you try to run |
I have same issue here. I try to execute flutter clean but not solve the problem |
Same here, no difference with There must be something that changed that's causing the problem. If you want to post a link(s) to the changes you made, maybe we can take a look? |
Is not a solution, but if you downgrade to 2.3.2 it works correctly. |
Same issue here. Tried using version 2.3.2, did all the things prescribed in the README |
@noordawod this is the link to the commit : b1b481e If you find anything that could cause that ... I have multiple reports of people using 2.3.3 without any problem so I don't exactly know why It would not behave the same everywhere. |
According to (https://developer.android.com/reference/android/location/OnNmeaMessageListener), the Could you maybe add @TargetApi(android.os.Build.VERSION_CODES.NOUGAT)
private void createLocationCallback() {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.NOUGAT) {
// ...
}
} |
Ohhh okay thanks a lot for catching that ! My bad there. I'll update this as soon as possible :/ |
Hey, the app shouldn't crash anymore on API level 21. I'll test the sample application on a simulator on API Level 21 to avoid those kind of errors in the coming release. Thanks to everyone involved in helping :) |
Left you a comment on the commit. Unsure but I think you have a typo there. |
@Lyokone Was the issue is resolved in the latest release? Thanks alot for your work. |
Same problem here. When having location: ^2.3.2 as a dependency, the app crashes when opening. |
Hi. I'm facing another issue related to this. It happens only in Android and the location plugin version that I'm using is location: ^2.3.5, but I already tried to downgrade the version to see if it would solve it, but it didn't work. Another bug that is occurring is that the permission is being asked multiple times, around 8. Again, this only happens when the Platform is Android. Does anyone know what could be going on? Here is how the error looks like: Thanks! |
Try adding
to your |
This did the trick for me too! Thanks! |
This error is caused if _location.onLocationChanged().listen is called before _location.requestPermission() or _location.requestService() |
Hi, i have and error in my code Please help W/FlutterActivity(11833): Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@6a2db95) but could not find and invoke the GeneratedPluginRegistrant. Flutter run key commands. Application finished. PS D:\Mega\Tesis\Tesis Luz de Esperanza\GitHub\IdealCovid\ideal_covid> flutter clean |
I have a slight similar error
|
The app crashes at start-up throwing this error, when using location: ^2.0.0 (compileSdkVersion 28, targetSdkVersion 28)
java.lang.Throwable: java.util.concurrent.CompletionException: java.io.IOException: Application terminated at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134) at io.flutter.view.InspectorPanel.lambda$recomputeTreeRoot$5(InspectorPanel.java:575) at io.flutter.inspector.InspectorService$ObjectGroup.lambda$null$69(InspectorService.java:872) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:732) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
flutter doctor -v:
`
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Versione 10.0.17134.472], locale it-IT)
• Flutter version 1.0.0 at E:\A - Installazioni\Flutter\flutter
• Framework revision 5391447fae (2 months ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at C:\Users\Damiano\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 29.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] IntelliJ IDEA Community Edition (version 2018.3)
• IntelliJ at E:\A - Installazioni\IntelliJ IDEA Community Edition 2018.3.3
• Flutter plugin version 31.3.4
• Dart plugin version 183.5153.38
[√] Connected device (1 available)
• X30 • 0123456789ABCDEF • android-arm • Android 7.0 (API 24)
• No issues found!
E:\FlutterProjects\Tutorials\flutter_app_weather>
`
The text was updated successfully, but these errors were encountered: