webyonet / react-native-android-location-services-dialog-box

React Native Android Location Services Dialog Box
MIT License
182 stars 50 forks source link

RuntimeException #25

Closed lvntayn closed 7 years ago

lvntayn commented 7 years ago

Hi, I'm getting the following errors:

` java.lang.RuntimeException: at android.app.ActivityThread.deliverResults (ActivityThread.java:4925) at android.app.ActivityThread.handleSendResult (ActivityThread.java:4968) at android.app.ActivityThread.access$1600 (ActivityThread.java:222) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1849) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:158) at android.app.ActivityThread.main (ActivityThread.java:7229) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

Caused by: java.lang.RuntimeException: at com.facebook.react.bridge.CallbackImpl.invoke (CallbackImpl.java:30) at com.facebook.react.bridge.PromiseImpl.resolve (PromiseImpl.java:32) at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule.checkLocationService (LocationServicesDialogBoxModule.java:60) at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule.onActivityResult (LocationServicesDialogBoxModule.java:90) at com.facebook.react.bridge.ReactContext.onActivityResult (ReactContext.java:256) at com.facebook.react.ReactInstanceManager.onActivityResult (ReactInstanceManager.java:601) at com.facebook.react.ReactActivityDelegate.onActivityResult (ReactActivityDelegate.java:149) at com.facebook.react.ReactActivity.onActivityResult (ReactActivity.java:77) at com.demo.MainActivity.onActivityResult (MainActivity.java:23) at android.app.Activity.dispatchActivityResult (Activity.java:7137) at android.app.ActivityThread.deliverResults (ActivityThread.java:4921)

` Devices: Galaxy J7, Galaxy S7 Edge Android 6.0 compileSdkVersion: 23 buildToolsVersion: 25.0.2

webyonet commented 7 years ago

What is the react version? and which version of this module do you use?

lvntayn commented 7 years ago

React Native version: ^0.46.1 This module version: ^2.0.0

webyonet commented 7 years ago

No, you can not use version 2.0.0 for RN 46. The 2.0.0 version is based on RN 47 and later. See breaking changes Please use v1.2.3

lvntayn commented 7 years ago

Hi, I still get same problem. This problem only exists in Android 6.0.

` java.lang.RuntimeException: at android.app.ActivityThread.deliverResults (ActivityThread.java:5007) at android.app.ActivityThread.handleSendResult (ActivityThread.java:5050) at android.app.ActivityThread.access$1600 (ActivityThread.java:230) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1876) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:148) at android.app.ActivityThread.main (ActivityThread.java:7409) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

Caused by: java.lang.RuntimeException: at com.facebook.react.bridge.CallbackImpl.invoke (CallbackImpl.java:30) at com.facebook.react.bridge.PromiseImpl.resolve (PromiseImpl.java:32) at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule.checkLocationService (LocationServicesDialogBoxModule.java:55) at com.showlocationservicesdialogbox.LocationServicesDialogBoxModule.onActivityResult (LocationServicesDialogBoxModule.java:85) at com.facebook.react.bridge.ReactContext.onActivityResult (ReactContext.java:256) at com.facebook.react.ReactInstanceManager.onActivityResult (ReactInstanceManager.java:601) at com.facebook.react.ReactActivityDelegate.onActivityResult (ReactActivityDelegate.java:149) at com.facebook.react.ReactActivity.onActivityResult (ReactActivity.java:77) at com.demo.MainActivity.onActivityResult (MainActivity.java:23) at android.app.Activity.dispatchActivityResult (Activity.java:7165) at android.app.ActivityThread.deliverResults (ActivityThread.java:5003) `

React Native version: ^0.46.1 This module version: 1.2.3

Application compileSdkVersion 23 buildToolsVersion '23.0.3' targetSdkVersion 23

Module compileSdkVersion 23 buildToolsVersion "25.0.2" targetSdkVersion 23

webyonet commented 7 years ago

edit package.json as follow: "react-native-android-location-services-dialog-box": "1.2.3"

make steps at the terminal step by step:

1) react-native unlink react-native-android-location-services-dialog-box
2) npm uninstall react-native-android-location-services-dialog-box
3) npm install
4) react-native link react-native-android-location-services-dialog-box
5) react-native run-android