transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
645 stars 239 forks source link

Crash APP when opened. Compiles perfectly but Crash when opened. #48

Closed mateusschmidt closed 5 years ago

mateusschmidt commented 5 years ago

Your Environment

[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale en-BR) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] iOS toolchain - develop for iOS devices (Xcode 10.2) [!] Android Studio (version 3.1) ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. [✓] VS Code (version 1.32.3) [✓] Connected device (1 available)

Actual Behavior

No open App

Steps to Reproduce

  1. Compile perfect
  2. When you start APP
  3. Crash

Context

When you start APP

Debug logs

--------- beginning of crash 04-03 11:27:33.429 14319-14319/br.com.smartmonitoramento.app E/AndroidRuntime: FATAL EXCEPTION: main Process: br.com.smartmonitoramento.app, PID: 14319 java.lang.ExceptionInInitializerError at d.k.a.a.w.(:102) at d.k.a.a.w.a(:85) at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(:57) at br.com.smartmonitoramento.app.MainActivity.onCreate(:14) at android.app.Activity.performCreate(Activity.java:6666) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6251) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1075) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference at com.transistorsoft.locationmanager.a.A.a() at com.transistorsoft.locationmanager.a.v.() at d.k.a.a.w.(:102)  at d.k.a.a.w.a(:85)  at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(:57)  at br.com.smartmonitoramento.app.MainActivity.onCreate(:14)  at android.app.Activity.performCreate(Activity.java:6666)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:203)  at android.app.ActivityThread.main(ActivityThread.java:6251)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1075)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 

christocracy commented 5 years ago

is this from a debug or release build?

mateusschmidt commented 5 years ago

Debug and Release

mateusschmidt commented 5 years ago

below plugins that I use in my App:

  recase: 
  json_annotation: 
  async: 
  intl: 
  cupertino_icons: 
  crypto: 
  dio: 
    git: https://github.com/mateusschmidt/dio.git
  shared_preferences: 
  async_loader: 
  sembast: 
  path_provider: 
  url_launcher: 
  photo_view: 
  geolocator: 
  flutter_map: 
  html2md: 
  cloud_firestore: 
  firebase_core:
  firebase_auth:
  device_info:
  http: 
  flutter_image_compress: 
  firebase_messaging: 
  firebase_analytics: 
  screentheme: 
  rxdart: 
  uuid: 
  flutter_webview_plugin: 
  synchronized: 
  datetime_picker_formfield: 
  flutter_svg: 
  flutter_masked_text: 
  google_sign_in: 
  mockito:  
  file_picker: 
  mjpeg: 
    git: https://github.com/mateusschmidt/flutter_mjpeg.git
  unicorndial: 
  flutter_sticky_header: 
  firebase_storage: 
  package_info: 
  google_maps_flutter: 
  flutter_swiper: 
  flutter_html: 
  image_crop: 
  image_cropper: 
  connectivity: 
  camera: 
  bloc_pattern: 
  permission_handler: 
  geocoder: 
  firebase_performance: 
  ntp: 
  flutter_sound:
    git: https://github.com/robsonarduin/flutter_sound.git
  auto_size_text: 
  charts_flutter:  
  flutter_staggered_grid_view: 
  scoped_model:
  flutter_tags: 
  flutter_typeahead: 
  diacritic:
  flutter_background_geolocation:     
    git: 
      url: https://github.com/transistorsoft/flutter_background_geolocation.git
christocracy commented 5 years ago

Can you make your app available to me?

mateusschmidt commented 5 years ago

I created a new project and applied the same plugins and it worked. Thank you.

christocracy commented 5 years ago

Ok, closing. It looks like there was something unexpected in the AndroidManifest